Netscape Image cacheing control? 
Author Message
 Netscape Image cacheing control?

Hi,
        I'm using perl to generate a random image from a collection. Now the
perl script works and the image displays. The problem is that netscape
caches, the images, even when they change. Is there any way to tell
Netscape, not to cache an image?

I've tried to set expiration dates for the html, and the using
pragma's
no-cache.

But these only prevent cacheing of the html.

Any suggestions?



Sat, 03 Jul 2004 00:08:10 GMT  
 Netscape Image cacheing control?

Quote:

> Hi,
>    I'm using perl to generate a random image from a collection. Now the
> perl script works and the image displays. The problem is that netscape
> caches, the images, even when they change. Is there any way to tell
> Netscape, not to cache an image?

> I've tried to set expiration dates for the html, and the using
> pragma's
> no-cache.

> But these only prevent cacheing of the html.

> Any suggestions?

You didn't say which version of Netscape. ...but try this: Go to
Preferences:Advanced:Cache and select "compare page everytime..." You
might also try setting the disk and the memory cache to 0 if that
doesn't work.

/whatever



Sat, 03 Jul 2004 00:22:57 GMT  
 Netscape Image cacheing control?
On 14 Jan 2002 15:08:10 -0800,

Quote:
> Hi,
>    I'm using perl to generate a random image from a collection. Now the
> perl script works and the image displays. The problem is that netscape
> caches, the images, even when they change. Is there any way to tell
> Netscape, not to cache an image?

If there is such a way, then it is not related to Perl, but to the
Netscape web browser, and maybe the HTTP protocol. You should probably
ask this question in a newsgroup that talks about these things. Most
newsgroups related to the Web can be found int he
comp.infosystems.www.* hierarchy.

Martien
--
                                |
Martien Verbruggen              | Little girls, like butterflies, need
Trading Post Australia Pty Ltd  | no excuse - Lazarus Long
                                |



Sat, 03 Jul 2004 00:26:37 GMT  
 Netscape Image cacheing control?

Quote:

> Hi,
>         I'm using perl to generate a random image from a collection. Now the
> perl script works and the image displays. The problem is that netscape
> caches, the images, even when they change. Is there any way to tell
> Netscape, not to cache an image?

> I've tried to set expiration dates for the html, and the using
> pragma's
> no-cache.

> But these only prevent cacheing of the html.

create a new url for each access:

let's say the image has this url

  http://foo.bar.com/cgi-image.pl

 fake a new url for any request
by adding a PATH_INFO string to the cgi url  

-->
        $rand = rand();
        print qq[<img src="http://foo.bar.com/cgi-image.pl/$rand">];
<!--

the img tag with randomozed url might be created using javascript, php
or perl + SSI include  or whatever else ...
it must not contain a lot more than the two lines above  

this method works well ...
i do not know any other method apart of randomized url



Sat, 03 Jul 2004 01:46:21 GMT  
 Netscape Image cacheing control?
On Jan 14, James inscribed on the eternal scroll:

Quote:
>    I'm using perl to generate a random image from a collection. Now the
> perl script works and the image displays. The problem is that netscape
> caches, the images, even when they change. Is there any way to tell
> Netscape, not to cache an image?

Ask on a CGI group - this is not a Perl problem, I see you've been
rewarded with one rubbish answer already.  [f'ups set - check the CGI
group's how-to-post FAQ before posting]

Well, read an appropriate cacheing faq first - I'd recommend
http://www.mnot.net/cache_docs/ for this kind of issue.

Netscape is not the only WWW browser (well, "Netscape" is at least 2
browsers already), by the way (even if you consider that MSIE
disqualifies itself by its various protocol violations).

Quote:
> I've tried to set expiration dates for the html, and the using
> pragma's
> no-cache.

> But these only prevent cacheing of the html.

If you only put them on the HTTP headers of the HTML document, what do
you expect?

good luck (and welcome back to c.l.p.misc when you have a real Perl
language question)



Sat, 03 Jul 2004 02:26:04 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. remote control of netscape from perl script

2. image via cgi perl on netscape navigator

3. Refresh GD.pm images in Netscape

4. Controlling image display

5. Getting control over Imaging

6. Cacheing CGI output...

7. Avoid cacheing in LWP::Simple

8. HTML::Mason and cacheing

9. Cacheing and Back Button question.

10. perl compiled code cacheing

11. Image Magick finding image size without loading image

12. Problem with Netscape Enterprise Server 2.01 and binary post from Browser Netscape 2.0 or higher

 

 
Powered by phpBB® Forum Software