Project / Support Center
Welcome, Guest. Please login or register. November 29, 2021, 12:58: AM
Home Help Search Login Register
D-Web Web Site Creator D - Web Web Site Creator On-line HTML Editor No Programming knowledge required. Web Global Net PayPal-Cart Shopping Cart System PayPal - Kart Shopping Cart System for E-Commerce over the internet, that's easy to use. Web Global Net Newsletter Manager Newsletter Manager On-line Newsletter Creator with Email Subscriber Management.
Ring Central Discount
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  php related  |  Topic: How to prevent Browser cache for php site 0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Send this topic Print
Author Topic: How to prevent Browser cache for php site  (Read 692 times)
admin
Administrator
******
Offline Offline

Posts: 230


« on: August 11, 2021, 07:34: PM »

Here, if you want to control it through HTML: do like below Option 1:

<meta http-equiv="expires" content="Sun, 01 Jan 2021 00:00:00 GMT"/>
<meta http-equiv="pragma" content="no-cache" />
 
And if you want to control it through PHP: do it like below Option 2:

header('Expires: Sun, 01 Jan 2021 00:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');

AND Option 2 IS ALWAYS BETTER in order to avoid proxy based caching issue.
Report to moderator   Logged

The Unknown Webmaster
Pages: [1] Go Up Send this topic Print 
Web Global Net Web Application & Web Development Project Center  |  Technical Issues  |  php related  |  Topic: How to prevent Browser cache for php site « previous next »
Jump to:  


Login with username, password and session length
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!