0

I'm developing a Web App using the cache manifest to be offline.

It's working fine, but I tried to add a no-cache directive in Apache for one of the file (the js one), to be sure the last version would be loaded each time I change the manifest file.

But actually, the js file is now reloaded every time (when the device is not offline, of course), although the manifest file did not change.

I tested it only on Safari and WebKit.

Is it the normal behavior ? I thought the manifest directive would supplant the apache one...

EDIT : Actually, I disabled the apache no-cache directive, and my js file is still reloaded every time, despite the fact the manifest is not modified.

I don't understand. A few days ago, this JS file would never reload, even with manifest change, and now it's reloaded every time (except when the device is really offline)

So it's not really a question anymore, but maybe you'll have a lead for me...

Matthieu
  • 563
  • 1
  • 7
  • 25

2 Answers2

2

I just read a good article on this subject.

http://www.webdirections.org/blog/appcache-not-so-much-a-douchebag-as-a-complete-pain-in-the/

Dave S
  • 849
  • 7
  • 7
  • Thanks for the link, it's valuable information, although it's not the answer to my particular question – Matthieu Nov 08 '13 at 11:21
0

It's a very particular case, but in case it happens to someone else :

I tested on Chrome, and I was working normally. So on safari, I emptied the cache, and everything return to normal. On my iPhone, I switch to airplane mode, load the site, and go back to connected mode, and it returns to normal too.

So I assume some cached files were corrupted, causing Safari to load the files each time, without issuing any error... :(

I'm not completely sure, as it was like a "phantom bug". But in case it helps.

EDIT : after further investigation, it appears the corruption came from the fact I tried to add a parameter to my jsfile, ie my file.js?v=xxx

Everytime I tried to put it back, with or without reflecting it in the manifest file, it came to this bug/strange behavior...

Matthieu
  • 563
  • 1
  • 7
  • 25