Prevent Safari from caching using HTTP headers

W

Werschinger

Hello PHP group

I'm trying to prevent Safari from caching pages (e.g. private pages),
so it is not possible to view them when hitting the back button. I've
seen it work on many pages, especially banking pages.

I tried it as described on Apple's developer site:
http://developer.apple.com/internet/safari/faq.html#anchor5

using (in PHP)

// PHP example - include at the top of your pages
<? php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "
GMT");
header("Cache-Control: no-store, no-cache, must-revalidate,
max-
age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>

However, this does not work.

Does anyone know a reliable solution?

Many thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top