Thanks Gunnar and Mumia.
I figured out that the problem is unique to Internet Explorer. The three
other browsers I tried don't have this problem. But I can't get IE to not
cache. I've tried these:
print "Cache-Control: no-cache\n";
print "Pragma: no-cache\n"; # for HTTP/1.0
print "Expires: Fri, 26 Mar 2004 01:40:42 GMT\n";
print "Cache-Control: must-revalidate, max-age=1\n";
IE still caches.
Can anyone give some insight into where the problem might be?
Thanks.
On 9/2/07 3:34 PM, "Mumia W." <[EMAIL PROTECTED]> wrote:
> On 09/02/2007 01:16 PM, Carl Miller wrote:
>> I'm trying to setup a simple random image script to allow other websites to
>> display random banner ads located on my server.
>>
>> The other website would call the perl script in an <img> tag, like so:
>>
>> <img src="http://www.my_site.com/cgi-bin/random_banner.cgi" width="468"
>> height="60">
>>
>> I've tried several perl scripts that basically work, but the problem is
>> always the same with all of them: the browser always caches
>> 'random_banner.cgi' causing the same banner to be displayed on every
>> subsequent page. The only way to see a different banner is to hit
>> Reload/Refresh.
>>
>> Is there a script out there that avoids the cache problem in displaying
>> random banners via an <img> tag?
>>
>> Thanks!
>>
>>
>>
>
> Use a "Cache-control" header that specifies "no-cache" and use an
> Expires header that uses a date in the past.
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/