English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need to prevent Web browsers caching a page automatically, not manually like the one in IE Settings.
I have used the following tags, but it is not working for me

2006-12-15 20:59:54 · 1 answers · asked by Saravanan S 1 in Computers & Internet Programming & Design

1 answers

This can be done with HTTP headers. For example, in 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");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");

According to the site in my "source", these headers are ignored for images.

2006-12-16 09:54:09 · answer #1 · answered by watsonc64 3 · 0 0

fedest.com, questions and answers