Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Use of Cache-Control can be difficult in browsers #224

Open
quentez opened this issue Mar 7, 2014 · 2 comments
Open

Use of Cache-Control can be difficult in browsers #224

quentez opened this issue Mar 7, 2014 · 2 comments

Comments

@quentez
Copy link
Contributor

quentez commented Mar 7, 2014

When performing XHR requests within the first second* of a page refresh, some browsers will override the Cache-Control header for those requests.

In FF, max-age=0 is appended.
In Chrome, max-age=0 replaces whatever was set when building the XHR.

This makes it difficult to make tent requests that require proxy or no-proxy as their Cache-Control value during that critical time frame.

I suggest moving away from the Cache-Control header and either use a custom header (something like X-Tent-Cache-Control) or anything else that doesn't involve something the browsers could meddle with.

* : Approximately, depends on the browser and doesn't appear to be a constant.

@jvatic
Copy link
Member

jvatic commented Mar 7, 2014

This appears to only occur when reloading the page. Chrome's behavior of completely replacing the Cache-Control header is problematic.

@quentez
Copy link
Contributor Author

quentez commented Mar 7, 2014

Yep, only when reloading. I'll try to see if Safari/IE have similar behaviors.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants