New issue
Advanced search Search tips

Issue 849579 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

The page shown by back button doesn't use the cached data from original page if cached data is fetched from the different page using XHR

Reported by peace0...@gmail.com, Jun 5 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Domain A requests Domain B API using XHR ( Access-Control-Allow-Origin exists)
2. Go To Domain B page requesting the same domain B API using XHR ( Access-Control-Allow-Origin does not exist because of the same domain)
3. Back to the page domain A using back button then chrome uses  cached data from domain B page even if the current page's domain is domain A. In this case, the error message 'No 'Access-Control-Allow-Origin' header is present on the requested resource.' is shown.

What is the expected behavior?
When back to domain A page, domain A page should use the cached data from original page(domain A) not a different page(domain B).

What went wrong?
When back button is pressed, cached data from the different page is used. The cached data is valid on different page but may be invalid on the moved page by back button in the specific case like cached data may have different CORS header depending on requesting page domain.

Did this work before? N/A 

Chrome version: 66.0.3359.181  Channel: n/a
OS Version: OS X 10.13.3
Flash Version:
 
Labels: Needs-Triage-M66
Cc: clamy@chromium.org
Components: -Internals>Network Internals>Network>Cache UI>Browser>Navigation
This is unfortunate behavior, but it may be a while before we can fix it.

The reason this happens is:
1. The HTTP cache is not domain-keyed. That is, we don't store a resource twice if it is requested from two separate domains.

2. We skip cache validations in back-forward navigations for performance.  This is because Chrome lacks a classic "bfcache" which keeps the entire page state in memory.

+clamy who is working on a proposal for a new back-forward mechanism, which might fix this issue.
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Feedback Triaged-ET
Gentle Ping...

@clamy@chromium.org : Could you please let us know is there any latest update available on this issue?

Thanks.!
clamy: Friendly ping? :)
Labels: -Needs-Feedback
Removing needs-feedback label (Which was directed at clamy@), since I don't think it's productive to keep this bug in our needs-feedback queue.
Sorry missed this. The b/f cache is still in an investigative phase, so it's unlikely to appear anytime soon (if it ever does).
Cc: swarnasree.mukkala@chromium.org
Labels: TE-NeedsTriageHelp
The issue seems to be related to XHR ( Access-Control-Allow-Origin exists) and the issue is already taken care of by the dev team. Hence adding TE-NeedsTriageHelp label, to remove issue from our bucket list.
Thanks.!

Sign in to add a comment