Titan
Titan

Reputation: 6040

App cache not working, despite Chrome correctly caching assets

If I load the page while online chrome console logs:

Document was loaded from Application Cache with manifest http://app.x.com/cache.manifest app.x.com/ Application Cache Checking event app.x.com/ Application Cache Downloading event app.x.com/ Application Cache Progress event (0 of 7) http://app.x.com/public/img/logos/logo.png app.x.com/ Application Cache Progress event (1 of 7) http://app.x.com/public/img/backgrounds/crowd.png app.x.com/ Application Cache Progress event (2 of 7) http://app.x.com/public/img/icons/[email protected] app.x.com/ Application Cache Progress event (3 of 7) http://app.x.com/public/js/third_party/zepto.js app.x.com/ Application Cache Progress event (4 of 7) http://app.x.com/public/css/compiled.css app.x.com/ Application Cache Progress event (5 of 7) http://app.x.com/public/js/compiled.js app.x.com/ Application Cache Progress event (6 of 7) http://app.x.com/ (index) Application Cache Progress event (7 of 7) (index) Application Cache UpdateReady event

To me this looks fine?

chrome://appcache-internals shows:

chrome debug

However, as soon as I pull the plug on my Ethernet and refresh I get an un-styled page with the following in my console:

nostyles

For reference my cache.manifest looks like:

CACHE MANIFEST
# v52
CACHE:
public/js/third_party/zepto.js
public/js/compiled.js
public/css/compiled.css
public/img/logos/logo.png
public/img/backgrounds/crowd.png
public/img/icons/[email protected]

NETWORK:
*

And I have AddType text/cache-manifest .manifest in my .htaccess

Upvotes: 3

Views: 953

Answers (1)

Titan
Titan

Reputation: 6040

This was my fault. I was using css/compiled.css?123 in my header. The ?123 was an ever changing number to bust the cache during development. It seems the application cache treats this as a seperate file so I either have to remove the unique ID or sync it with the application cache for this to work.

Upvotes: 2

Related Questions