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...


In reply to Re: web page refreshing problem by fsn
in thread web page refreshing problem by db2admin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.