On Thu, May 25, 2000 at 07:40:10PM +1000, Jeff Waugh wrote:
> > > print $q->header(-type=>'text/html',
> > > -expires=>'+30s',
> > > -pragma=>'no-cache',
> > > -cache-control=>'no-cache');
> > >
I made some mistakes with the above.
#!/usr/bin/perl
use CGI;
my $q = new CGI;
my $now = gmtime;
my $etag = time()
print $q->header(-type=>'text/html',
-expires=>'+30s',
-pragma=>'no-cache',
-last_modified=>"$now",
-cache_control=>'no-cache',
-etag=>"$etag"),
$q->start_html,"test",$q->br,$now,$q->br,$etag,$q->br,
$q->img({-expires=>'+30s',
-pragma=>'no-cache',
-cache_control=>'no-cache',
-last_modified=>"$now",
-etag=>"$etag",
-src=>'file:///tmp/test.gif'}),
$q->end_html;
I have no idea if they are valid img headers.
but you get:
Expires: Thu, 25 May 2000 10:10:44 GMT
Date: Thu, 25 May 2000 10:10:14 GMT
Pragma: no-cache
Etag: 959249414
Cache-control: no-cache
Last-modified: Thu May 25 10:10:14 2000
Content-Type: text/html
and later
<IMG LAST-MODIFIED="Thu May 25 10:10:14 2000"
CACHE-CONTROL="no-cache"
SRC="file:///tmp/test.gif"
PRAGMA="no-cache"
EXPIRES="+30s"
ETAG="959249414">
Have a look at http://www.web-caching.com/mnot_tutorial/
--
chesty
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text