in reply to Item not refreshing with the page

I think atcroft is right. If the image name/size does not change then the browser will use its owned cached version. Try adding a 'no-cache' pragma to your HTML header. I note you are using CGI.pm, therefore the additional header is:
print header( -pragma => 'no-cache' );
This should handle it with any luck.

jdtoronto

Replies are listed 'Best First'.
Re: Re: Item not refreshing with the page
by bobn (Chaplain) on Jan 25, 2004 at 05:53 UTC

    I've seen images refuse to refresh even when the rest of the page was. If this still happens, try somethng like:

    $dummy = rand(1000); print "<center><img src=\"test.png?x=$dummy\"></center>";
    to convince the browser (and any intermediate caching things) that the image is in fact query.

    --Bob Niederman, http://bob-n.com

    All code given here is UNTESTED unless otherwise stated.

      Your code is engenius, it really is. That totally fools the browser into thinking it's something it can't cache and it worked. That's utterly amazing, thank you for this tip!

      And thank you to the others. I didn't know an image will stay in cache as long as the name and size doesn't change. I just thought it reloaded the image if it realizes the page has been updated since the last time it's visited. Thanks for that information.



      "Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

      sulfericacid
        I can't claim credit for originating this - I got the idea from a list or a newsgroup when I was fighting a similar issue - glad it helped.

        --Bob Niederman, http://bob-n.com

        All code given here is UNTESTED unless otherwise stated.