Website wont update without clearing cache

My website URL is:

www.grandmascookbook.co.uk

in a nutshell, any changes I make to the website are not visible without first clearing the web cache. This isnt limited to any single browser, it applies to mobile, chrome, mozilla etc, on mobile and desktop.

I’ve also made changes from different locations and ISP’s, same result.

The website is basically something requested by my Grandmother, for her to stick all of her recipes in one place. Im teaching myself front end web development, so I thought it would be a good place to start, as its a pretty simple concept that needs to be easy to use (which makes it easy to build), but obviously due to the fact that you have to clear your cache to see the new recipe each time I add one, its makes the entire thing redundant. Not to mention the fact that my grandmother wouldn’t know how to clear her cache.

Can anyone help? Is it something that I’m doing?

Thanks in advance.

Additional information:

Our servers enforce quite strong browser caching because it makes website appear faster and saves everyone in bandwidth costs. There is no way to disable this caching because, like with a security system, you don’t immediately notice the benefits, even though they outweigh the more noticeable downsides.

When working on a website myself, I usually build on test on my own computer first before pushing it to the live server. When the changes go live, it doesn’t matter so much if it takes a few minutes for everyone to see the changes. Maybe that would help you too?

5 Likes

Thanks for the reply -

Im not sure I follow, as its not a few minutes before people see the changes, they dont see the changes at all. Even if it was left for a month after the changes were made, they type in the link, all they get is the old cached page. Am I misunderstanding what you mean?

You can disable caching using htaccess file. There’re ton of codes that they disable caching, including this one:

# DISABLE CACHING
<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>

Note: it’ll make your site much slower.

3 Likes

Thanks for the answer.

I don’t understand why I need to do this and it doesn’t seem to be affecting anyone else though?

What makes you say the issue is not affecting anyone else?

There are at least weekly topics (gut feeling, not measured) about people wondering why their site doesn’t update after making changes. Which is almost always caused by browser cache.

2 Likes

So how is this resolved?

Or does this mean that infinityfree web hosting can only host websites that will never be updated, as no one will be able to see the changes unless they clear their cache? I’m really confused.

With patience.

Or by setting .htaccess rules to disable cache, like @anon19508339 suggested, but that’s definitely not recommended, because it will slow down your website and increase server load, meaning your website won’t be able to handle so much traffic.

People will still see changes, just not right away. It can take a few minutes, hours or days for the changes to be visible, depending on the file type to which the change was made, but that’s usually an acceptable trade-off for additional performance.

2 Likes

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