~ubuntu-branches/ubuntu/maverick/ilohamail/maverick

« back to all changes in this revision

Viewing changes to IlohaMail/include/nocache.inc

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Jaspert
  • Date: 2004-02-04 13:44:37 UTC
  • Revision ID: james.westby@ubuntu.com-20040204134437-kz8j3ui2qa7oq8z2
Tags: upstream-0.8.12
ImportĀ upstreamĀ versionĀ 0.8.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/********************************************************
 
3
        include/icl.inc
 
4
        
 
5
        (C)Ryo Chijiiwa <Ryo@IlohaMail.org> 2002 
 
6
 
 
7
        This file is part of IlohaMail, and released under GPL.
 
8
        See COPYING, or http://www.fsf.org/copyleft/gpl.html
 
9
        
 
10
        PURPOSE:
 
11
                Sets HTTP headers to disable cache if using non-Netscape browser
 
12
 
 
13
********************************************************/
 
14
if (isset($HTTP_USER_AGENT)) $ua = $HTTP_USER_AGENT;
 
15
else if (isset($_SERVER)) $ua = $_SERVER["HTTP_USER_AGENT"];
 
16
 
 
17
$isns = stristr($ua, "Mozilla") && (!(stristr($ua, "compatible"))) && (!(stristr($ua, "Safari")));
 
18
if (!$isns){
 
19
        header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
 
20
        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
 
21
        header("Cache-Control: no-store, no-cache, must-revalidate");  // HTTP/1.1
 
22
        header("Cache-Control: post-check=0, pre-check=0", false);
 
23
        header("Pragma: no-cache");                          // HTTP/1.0
 
24
}
 
25
?>
 
 
b'\\ No newline at end of file'