Forum Moderators: open
i have some pictures in the server uner cgi-bin directory. using a script i view the pictures in the browser and see that every time, its getting downloaded from the server. how to cache the pictures and aviod doanloading from the server again and again.
thanks
rsennat
I think this issue has more to do with the user's browser. I would suggest making access to content which you may find using more bandwidth then you'd like to see a bit more restrictive.
It may be possible to do something with...
JavaScript...
[webmasterworld.com...]
...or the HTTP sever software you're using (such as Apache).
IE's default setting (which will be what most users have) is to check for new versions "automatically" rather than "every time". This means that, for most users, there should only be a new trip to the server if the expiration time set for the IE cache has expired since the last download. This behavior is always overridden by an intentional refresh or direct instruction to get a file -- and I'm guessing that your script is a direct instruction rather than going through the IE shell.
It would be worthwhile to use a server headers checker to make a request, and see what Cache-control and Expires header info the server is returning.
Jim
Caching Tutorial for Web Authors and Webmasters [mnot.net]
Cacheability Checker [ircache.net]
Thanks!
print "Cache-Control: max-age=600 must-revalidate\n";
print "Expires: Thu, 29 Nov 2005 17:04:19 GMT\n";
print header;
in the Perl /CGI scripts.
This caches the whole page and further requests are not given to server. So this creates a serious problem.
Only the images that i use in my scripts to be displayed has to be cached.
please help me on this.
thanks
rsennat