Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

updated can a file

more options

Hi,

I am trying to develop a responsive website.

However, when I update the css file Android Firefox doesn't load the update. However, Chrome does.

What do I need to do to fix this?

Gary

All Replies (6)

more options

Hi Gary, does it work in a private tab? Private tabs should not share cached files or previously set cookies with regular tabs. If it works in a private tab, you may need to clear the cache (in Firefox settings, not Android settings) before you can see the changes in the regular tab.

more options

Hi,

I didn't know that.

Yes it does work correct in a privet tab.

But my users won't be in privet tabs.

Gary

more options

Hi Gary, if you have users who visit the site as often as you do, it's possible their Firefox will load the page from cache rather than getting the fresh page. It's difficult to solve this without versioning the file. What I mean is, add a timestamp to the URL like:

<link rel="stylesheet" type="text/css" href="https://www.example.com/styles.css?v=1636247243">

Firefox won't have that version in cache and will have to load the new one from the server.

more options

Hi,

Do I need to put the version in the CSS file? If so how.

Or does it only go on the URL?

Gary

more options

Hi Gary, it's only on the URL. Anything new after the ? and before the # is considered a different file by the browser and the cached copy is not used for that file.

more options

I suggest searching around to see what methods are recommended for your platform if you are using a CMS. As a starting point:

https://www.google.com/search?q=css+versioning+to+bypass+cache