PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Nov 21, 2017 8:40 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Mon Oct 10, 2016 5:25 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
This worked for both Chrome and Firefox (a total of 26 tests of changing the page). Firefox needed the additional "must-revalidate" statement.
Syntax: [ Download ] [ Hide ]
<meta http-equiv="cache-control" content="no-cache, public, max-age=86400, must-revalidate">
<meta http-equiv="expires" content="0">
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
 


And this also works on both Chrome and Firefox to set the max-age to 7 days. However the 7 days part is assumed okay. Only the 26 change tests were done.
Syntax: [ Download ] [ Hide ]
<meta http-equiv="cache-control" content="no-cache, public, max-age=604800, must-revalidate">
<meta http-equiv="expires" content="Tue, 01 Jan 2099 1:00:00 GMT">
<meta http-equiv="pragma" content="no-cache">
 


One more thing. I also found out that the webhost support made some changes to the flags at the server. So maybe that had something to do with it. However it did not get the Firefox part working. Only the must-revalidate change fixed that part.


Top
 Profile  
 
PostPosted: Mon Oct 17, 2016 4:08 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
The last set of meta statements failed on chrome about 3 days later so I simplified the statement to the statement below and it has been working as per the tests below.
<meta http-equiv="cache-control" content="no-cache, public, max-age=0, must-revalidate">

16 tests per browser.
2016/Oct/12 Chrome failed, Firefox passed. (because chrome failed I simplified the meta statement to have a single line and an expires of zero)
2016/Oct/12 Chrome passed, Firefox passed.
2016/Oct/13 Chrome passed, Firefox passed - Chrome passed, Firefox passed.
2016/Oct/14 Chrome passed, Firefox passed - Chrome passed, Firefox passed.
2 days without tests
2016/Oct/17 Chrome passed, Firefox passed - Chrome passed, Firefox passed.


Top
 Profile  
 
PostPosted: Tue Oct 18, 2016 6:53 am 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
Sadly Chrome just failed repeatedly while Firefox continues to work flawlessly. After reloading two pages on Chrome it started to work during my test. It seems every few days Chrome fails then it starts working again for a few days. The web pages are ultra simple and except for my test changes the webpages are exactly the same. I see no reason to beat my head against a wall trying things when FireFox works flawlessly so I have sent two messages to Chrome support telling then that Firefox works flawlessly while their browser fails every so often (I sent the actual full page too). I also told them I am going to tell my users exactly what is happening and advise them to use Firefox. Hopefully that will get their attention.


Top
 Profile  
 
PostPosted: Mon Jan 16, 2017 7:42 pm 
Offline
Forum Contributor

Joined: Fri Jul 18, 2014 1:54 pm
Posts: 170
I finally got back to this issue and tried the .htaccess code below with Google Chrome. It works. I did 10 days of tests with 12 tests a day for 120 tests in total. I stripped out all the other code.

<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group