Controlling Browser Cache
so suppose i have a whole bunch of images in a page, and then I go to a different url that has the exact same images and layout, since the url is different the browser will reload
Solution 1:
would asking the browser cache by using headers not help
header("Cache-Control: private, max-age=5400, pre-check=5400");
header("Pragma: private");
header("Expires: " . gmdate("D, d M Y H:i:s"). " GMT");
there a good site to check returned headers http://redbot.org try it out it may help plus theres http://www.mnot.net/cache_docs/ you may want to look at if you dont figger your answer.
Solution 2:
Images if they have a fixed directory /images/image1.jpg
will not be re-fetched unless you have set your headers to no-cache
. It should not re download all the images that were on another page.
Test this with any variety of tools, for instance Firebug with Firefox or Safari / Chrome webkit web developer tracking. It will notify you if it was being cached or re-downloaded.
Hope that is what you are asking...
Post a Comment for "Controlling Browser Cache"