Preventing browsers from caching content

Posted on 21-08-2018 by Nadir Latif


Source: https://stackoverflow.com/a/4485194/4508593

To prevent browsers from caching content such as RSS Feeds, the following Php code may be used:


header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");