Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv22003/chat/lib
Modified Files:
common.lib.php3
Log Message:
Improve a bit the cache control function
Index: common.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/common.lib.php3,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** common.lib.php3 2001/04/27 18:28:53 1.9
--- common.lib.php3 2001/04/29 10:44:55 1.10
***************
*** 64,68 ****
*
* @param string string to search for
! * @param mixed list or array to search inside
*
* @return integer the rank of the $toFind string in the array or '-1' if it
--- 64,68 ----
*
* @param string string to search for
! * @param mixed list or array to search inside
*
* @return integer the rank of the $toFind string in the array or '-1' if it
***************
*** 256,261 ****
function pmcHttpHeaders($theCharset = '', $noCache = true)
{
- pmcGrabGlobals('HTTP_USER_AGENT');
-
// Avoids using cache
if ($noCache)
--- 256,259 ----
***************
*** 264,276 ****
header('Expires: ' . $now);
header('Last-Modified: ' . $now);
! if (ereg('MSIE [56789]', $GLOBALS['HTTP_USER_AGENT']))
! {
! header('Cache-Control: no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
! }
! else
! {
! header('Cache-Control: no-cache, must-revalidate');
! }
! header('Pragma: no-cache');
} // end of the 'no cache' case
--- 262,268 ----
header('Expires: ' . $now);
header('Last-Modified: ' . $now);
! header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
! header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
! header('Pragma: no-cache'); // HTTP/1.0
} // end of the 'no cache' case
|