[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

How to Force Safari 4 to not Cache any php pages?

Asked by designitm in Search Engines, Scripting Languages, Web Servers

Tags: Safari, PHP, Cache, Apache, HTML

Hey,

I am completely stumped. I have been trying to force Safari to stop caching pages, specifically php pages.

I have done it all from Apache headers, html meta tags, and php headers.

Can anyone suggest a solution?

Thank you,

Daniel
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
PHP
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: private, no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
 
HTML Meta Tags
<meta http-equiv="expires" content="Mon, 26 Jul 1997 05:00:00 GMT"/>
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 
Apache
 
<FilesMatch "\\.(php)$">
	Header set Cache-Control "private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
	Header set Pragma "no-cache"
	Header set Expires "Mon, 26 Jul 1997 05:00:00 GMT"
</FilesMatch>
 
Related Solutions
Keywords: How to Force Safari 4 to not Cache a…
 
Loading Advertisement...
 
[+][-]10/28/09 12:19 PM, ID: 25687119Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/28/09 08:18 PM, ID: 25690421Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625