0

I'm using Firefox and use console.log quite a bit.
It just got updated to version 100, might have something to do with it.

But now files updates stop appearing in the browsers localhost upon refresh.

It's like the browser is still just seeing the older version of the files.

I have through trying and testing, found out that by going:
History
->Clear Recent History
->Select only cache, over the last 1 hour
And then click ok.

After that I can update the file and the browsers localhost will then show the new version after f5.

But after some time it stops working again in that given file.
And i need to repeat this.

I have tried:
Restarting the computer.
Reinstalling Firefox.
Renaming the given file im using each time.
Running sudo apt get update/upgrade
All to no avail.

It's like there is some cache storing the file and Firefox has just stopped updating that cache as I update the file.

Chromium appears to have the same problem.

I pressed f12 and there manually cleared several of the storages and that appears to solve the problem. But only temporarily. After a bit of time, its back. It's like its emptying some cache, which once filled. Does not get updated again.

My OS is Linux Mint, 20.2. And my browser is Firefox, version 100.0.

What's going on, how can I solve this?
Is anybody else having this issue?

Also, whatever the solution. I can expect this to be a problem for anyone trying to use my website. Question is how I can possibly solve this in a manner that solves this for anyone using my future website as well.

john-jones
  • 7,490
  • 18
  • 53
  • 86
  • Can this help ? https://support.mozilla.org/en-US/kb/websites-look-wrong-or-appear-differently – Philippe May 12 '22 at 19:52
  • I've gone over that url quite a bit and my problem doesn't seem to be mentioned there. – john-jones May 13 '22 at 08:15
  • If you're serving your files via a webserver, have you tried appending a version to the file URL? So, for example, `http://localhost/mycssfile.css?v=05172022143600`, where the v= the date and time? – Matthew M. May 17 '22 at 18:37
  • I always use page, and that can be changed by clicking the buttons. https://openage.org/chat/client/index.html?page=index – john-jones May 17 '22 at 20:38
  • Is there any plugin/library that serves your files on your development environment, like hot-reload? – ihsany May 18 '22 at 06:58
  • I don't know what you mean. – john-jones May 18 '22 at 08:28
  • There are a couple of knowledge gaps that need to be addressed. First, is the issue happening with every website you visit? If not, are there specific websites where it occurs? Is the content static or dynamic? Second, is this a website that's available/running on your local machine (as in, are you developing the website/web-app)? If yes, is it a raw HTML/CSS/JS that you're developing (like running the HTML file directly) (or) you're using some framework like React, Vue, etc. for the frontend? If there's a backend to the application, what framework/language is it written on? – Debargha Roy May 18 '22 at 13:50
  • its happening on localhost, and on the website. just this one website im working on. the content is very dynamic as i write everything in native javascript. yes this website is available on my machine in localhost. i write everything in native javascript, no framework. there is a backend and its nodejs. – john-jones May 18 '22 at 14:29
  • its here https://openage.org/chat/client/index.html?page=index. if you press f12, you can see i console.log 'ho'. if i change that on the server, it won't change in the browser until i clear recent history. – john-jones May 18 '22 at 14:32
  • 1
    Generally when im working on local website, i always turning devconsole(F12) and in `Network` tab the "Disable cache" checkbox is checked for me by default. So to avoid this kind of problems with browser caching. IDK if it helps in your case. – tokkerbaz May 18 '22 at 20:29
  • I can't ask all the users of the website to enter f12 and then click some stuff there. – john-jones May 28 '22 at 22:50

3 Answers3

1

I think I found the solution

In Firefox, go to:

about:config

And set the following values:

browser.cache.disk.enable = false

browser.cache.memory.enable = false

network.http.use-cache = false

Carter McKay
  • 432
  • 2
  • 12
1

I think , you should try removing userdata from /home//.config or /home//.config Search for Mozilla or Firefox Folder

1

For firefox I like to use the Clear Cache addon, especially when doing web development in order to get the most recent version of pages. You may also look at changing the way your browser caches by modifying your code, as outlined here.

tbell19
  • 21
  • 1
  • 4
  • I can't ask all the users of the website to download some addon. – john-jones May 28 '22 at 22:50
  • 1
    @john-jones, you may want to re-phrase your question, I and several others gave answers that were for clearing your browser cache because your question seemed specific to your browser. Nevertheless, the last link in my answer should still offer a solution. – tbell19 May 31 '22 at 14:16