http://qs321.pair.com?node_id=233815


in reply to web page refreshing problem

This sounds like a cacheing problem to me. You should tune your webserver to send HTMLheaders with all the correct no-caching -statements for the specific URL, like other suggested.

There is another, sneaky and hacky, way around this which may or may not work. You could reference the image as http://www.theserver.se/pics/theimage.png?a-randomly-generated-string , where http://www.theserver.se/pics/theimage.png is the actual reference, and what's after the ? is a random garbage string, generated differently each access.

Bascially you are sending an argument to the image. Of course, only CGI scripts can have arguments (not really, I think in some cases HTMLpages can take arguments), so the argument is never used (but it's there if you check the environment). But since you generate a new URL each time the cache will miss it and you make sure you get the correct image. To be honest I only tested this with Konqueror, but it works there.

So, now you know the trick. Here's the downside: you will pollute the caches along the way. Now, the cache in your webbrowser, that will only hurt you and your users. But if there are caching proxies between the server and browser, some administrator will get angry as the hitrate declines. Some caches are configured to not cache URLs with ? or cgi-bin in them. You could maybe put them in the garbage string also. Perhaps.

I've told you how you COULD do it, not how you SHOULD do it...