version 1.7, 2001/10/26 17:09:04
|
version 1.9, 2001/10/31 17:44:42
|
Line 8
|
Line 8
|
package Apache::loncommon; |
package Apache::loncommon; |
|
|
use strict; |
use strict; |
|
use POSIX qw(strftime); |
use Apache::Constants qw(:common); |
use Apache::Constants qw(:common); |
use Apache::lonmsg(); |
use Apache::lonmsg(); |
|
|
Line 71 sub get_unprocessed_cgi {
|
Line 72 sub get_unprocessed_cgi {
|
} |
} |
|
|
sub cacheheader { |
sub cacheheader { |
my $date=localtime; |
my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime); |
my $output .='<meta HTTP-EQUIV="Expires" CONTENT="'.$date.'" /> |
my $output .='<meta HTTP-EQUIV="Expires" CONTENT="'.$date.'" /> |
<meta HTTP-EQUIV="Cache-control" CONTENT="no-cache" /> |
<meta HTTP-EQUIV="Cache-control" CONTENT="no-cache" /> |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache" />'; |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache" />'; |
return $output; |
return $output; |
} |
} |
|
|
|
sub no_cache { |
|
my ($r) = @_; |
|
my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime); |
|
$r->no_cache(1); |
|
$r->header_out("Pragma" => "no-cache"); |
|
$r->header_out("Expires" => $date); |
|
} |
1; |
1; |
__END__; |
__END__; |