Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETags are insufficient for asset bundles #60

Open
pushred opened this issue Aug 28, 2013 · 5 comments
Open

ETags are insufficient for asset bundles #60

pushred opened this issue Aug 28, 2013 · 5 comments

Comments

@pushred
Copy link
Member

pushred commented Aug 28, 2013

I'm seeing some cache clearing issues for assets. Usually all seems to be okay, but I'm seeing some different experiences for other users. Firefox especially seems to have issues. @krackydile has the following cache entry that should have been expired by now if following the headers, but for some reason the browser is stubbornly refusing to clear that cache, even when directed to.

key: http://www.keithurban.net/compiled/scripts.js
fetch count: 3
last fetched: 2013-08-28 12:21:37
last modified: 2013-08-28 12:21:29
expires: 2013-08-28 13:21:29
Data size: 82637
file on disk: none
Security: This document does not have any security info associated with it.
Client: HTTP
necko:classified: 1
request-method: GET
request-Accept-Encoding: gzip, deflate
response-head: HTTP/1.1 200 OK Content-Encoding: gzip Accept-Ranges: bytes Cache-Control: public, max-age=3600 Content-Type: application/javascript Date: Wed, 28 Aug 2013 19:21:29 GMT Etag: "276944-1377686812000" Last-Modified: Wed, 28 Aug 2013 10:46:52 GMT Server: ECS (sjc/4F90) Vary: Accept-Encoding X-Cache: HIT x-powered-by: Express Content-Length: 82637

Despite the ETag matching the latest, the actual file contents are different.

I searched bugzilla for reports related to ETags but didn't see anything relevant or recent for this issue. I did find this thread which may provide some clues though. I'm wondering if Firefox disregards ETags on some level (if not outright) though as part of it's privacy efforts.

@Fauntleroy
Copy link
Contributor

I thought our use of Last-Modified and Expires obviated the need for ETag. Is this in development? If so, shouldn't we just implement https://github.com/SparkartGroupInc/solidus/issues/63

@pushred
Copy link
Member Author

pushred commented Sep 11, 2013

They should, but this was an issue specific to Firefox, in production.

@Fauntleroy
Copy link
Contributor

Going to come in and note that this, or something closely related, is causing big issues for asset cache clearing on Edgecast. We keep running into a problem where the markup cache is cleared, but the asset cache isn't, so at some point in the future this could cause serious issues.

@Fauntleroy
Copy link
Contributor

Is this still a problem? Or has our heavy use of Edgecast hidden the problem...

@pushred
Copy link
Member Author

pushred commented Jan 9, 2014

Well in this particular case I think it may have been occurring in local development. Have you continued experienced any issues with cached assets in Firefox @krackydile?

It's possible this could be behind some of the occasional cache purging issues we've seen with Edgecast. grunt-filerev and grunt-filerev-replace should definitively address any CDN issues though.

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

No branches or pull requests

2 participants