I have not really understood the best way to ensure caching of images and javascripts for a site, so that subsequent page loading of graphics takes place from the browser cache.
I had a php header which did not seem to be helping at all. Then I tried the trick to stop image flicker in IE6, in my htaccess file:
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
and find that this gives instant appearance of images on subsequent pages in both IE and FF.
My impression from the loading indicator on the browser is that any page is reloading all javascripts each time - as far as I can guess from the fact that the loading indicator is still green even after all visible page content is showing.
I always thought that a browser would normally cache all javascripts and style sheets too so that it never needed to reload them, but that doesn't seem to be happening for javascripts. Is there any php header or htaccess code which will make this happen?
Hi folks
I have not really understood the best way to ensure caching of images and javascripts for a site, so that subsequent page loading of graphics takes place from the browser cache.
I had a php header which did not seem to be helping at all. Then I tried the trick to stop image flicker in IE6, in my htaccess file:
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
and find that this gives instant appearance of images on subsequent pages in both IE and FF.
My impression from the loading indicator on the browser is that any page is reloading all javascripts each time - as far as I can guess from the fact that the loading indicator is still green even after all visible page content is showing.
I always thought that a browser would normally cache all javascripts and style sheets too so that it never needed to reload them, but that doesn't seem to be happening for javascripts. Is there any php header or htaccess code which will make this happen?
Blessings and thanks
Tony
Online outreach:
Internet Evangelism Day
Helping church websites:
Church Websites