2

i want the browsers to cache only images but not the html document, because when i modify the .html the browser shows the old version that is cached. this is the manifest.appcache specified in < html manifest="manifest.appcache" >:

CACHE MANIFEST

SETTINGS: prefer-online

NETWORK:

*

FALLBACK:

CACHE:

/img/cap.gif

/img/descarga(53).gif

/img/descarga(3).gif

/img/descarga(7).gif

i have tried specify the http headers

Cache-Control:no-cache, max-age=0

Expires:to a date equal to the date header,1 minute in the future and a date 1 year in the past

Pragma:no-cache

and as i saw in other question i set the tags in the html head:

meta http-equiv="cache-control" content="max-age=0"

meta http-equiv="cache-control" content="no-cache"

meta http-equiv="expires" content="0"

meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT"

meta http-equiv="pragma" content="no-cache"

but none of this work, the browser does cache the images and the html, there is another solution to this?, thanks.

Bashabi
  • 696
  • 1
  • 12
  • 40
user3152041
  • 65
  • 1
  • 1
  • 7
  • See if this helps : http://stackoverflow.com/questions/3099526/html-cache-control?rq=1 – Emma Aug 04 '14 at 12:39
  • i made it work changing the version of the manifest like proposed here http://stackoverflow.com/questions/8303785/html5-cache-manifest-working-great-on-chrome-but-not-on-firefox-and-opera it seems like there is no better solution.. – user3152041 Aug 05 '14 at 13:16

1 Answers1

0

Place this in the .htaccess this stoped cahcing of the specific file type

<filesMatch "\.(jpeg,png)$">
FileETag None
<ifModule mod_headers.c>
 Header unset ETag
 Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
 Header set Pragma "no-cache"
 </ifModule>
</filesMatch>
TyBourque
  • 618
  • 4
  • 18