Refresh required after website update

http://rplsa8.epizy.com/

(please specify the wehttp://rplsa8.epizy.com/bsite or account you are asking about)

No error messages

(please share the FULL error message you see)

After doing a website update, users (and myself) have noticed that some old information is being displayed. Refreshing the page brings up the correct data so it isn’t an update problem per se. I have noticed that some pages correctly reflect the new information and perhaps one page does not. I had a report today about the wrong data and the website was updated around 24 hours ago so it is not a proximity to update problem. Any ideas?

(other information and details relevant to your question)

That is due to a process called caching.

What happens is that when you visit a website, your browser downloads a copy of the files so it will load faster in the future. What you are experiencing is that the browser is taking the files it already has (the old ones), instead of downloading the new ones from the web server.

You can read more here:
https://www.cloudflare.com/learning/cdn/what-is-caching/

4 Likes

Thanks for the reply. I understand caching. What I am puzzled about is that when the website was on a different host’s server, the refresh arrow was not required after a website update–the current content displayed. Now, most of the current content displays and maybe one page does not and this is like 24 hours after the update. It’s no big deal but if it were just a simple fix, I would like to do it. Thanks again.

Unfortunately, I am not able to follow your last reply.

Are you saying that this was not a problem with your old host? This could be because of different server configurations.

2 Likes

The servers may not have had caching enabled in the configuration.

There is a fix in which is through .htaccess. If you want to use it, add it to your .htaccess in your htdocs directory (Do NOT edit your .htaccess in the root folder.)

Fix:

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

<FilesMatch ".(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|mp3|mp4|png|pdf|swf|txt)$">
    <IfModule mod_expires.c>
        ExpiresActive Off
    </IfModule>
    <IfModule mod_headers.c>
        FileETag None
        Header unset ETag
        Header unset Pragma
        Header unset Cache-Control
        Header unset Last-Modified
        Header set Pragma "no-cache"
        Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
        Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
    </IfModule>
</FilesMatch>
4 Likes

Thank you very much for the input–I’ll give it a shot. The Expires entry of 1 Jan 1970 is kind of curious.

January 1, 1970 is the Linux epoch of time. That just tells the browser that it’s cache is old, which it would be if it actually originated at that time.

If you wish to clear the cache and get a fresh copy from the server, press Ctrl+Shift+R on windows and chrome os.

5 Likes

The .htaccess file existed in the root but not in htdocs. I created a new Word document, added your instructions, changed the name to .htaccess and used ftp to upload it. The file was reported as being uploaded successfully and I saw it in htdocs for maybe a second and then it disappeared. I did it a couple of times and it disappeared each time. Is this the behavior you would have expected? Thanks.

If .htaccess is more than 10kb, it will be deleted

3 Likes

Thanks for the size tip. I recreated the file as a .txt file instead of a .doc and that lowered the size of file to 4kb which kept it from disappearing.

4 Likes

Also, .txt and .doc have different encodings. .txt is a plain text file, which is what all of your website files should be, even if they have different extensions (but excluding images, of course). .doc(x) files use a much different encoding, and if you try to open one with Windows Notepad you will see garbled characters, not your Word document. Keep this in mind for the future!

3 Likes

I was able to test the .htaaccess file today and it worked fine for all the browsers I tried except Firefox. With Firefox, the website update did not display (previous data still displayed) and the refresh button no longer worked (two different computers). I deleted the file from the server and then Firefox worked again except the refresh button was still required to display current data. I have wasted enough of everybody’s time on this–my league members will just have to put up with refreshing the page if necessary. Thanks to everyone who provided such great info. Regards, Ron

6 Likes

Thank you for this. You are a lifesaver

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.