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.
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
I think , you should try removing userdata from /home//.config or /home//.config Search for Mozilla or Firefox Folder
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.
Related
I have my work computer which is a Windows 10 Pro and my laptop is a Windows 10 Home. Working on the same project on both: push and pull to Git. Learning React through Udemy. Both computers using Chrome. Both using Bash on Ubuntu on Windows with latest updates. Both using ConEmu for the console. Both npm -v = 3.10.10. Both node -v = 6.11.2. Hardware is different obviously, but not sure that is relevant and worth listing.
Anyway, this starter project I am playing around with, when I make changes to it and npm start is running, you can see activity in the console, hit refresh in the browser, and any changes made will be reflected.
On the laptop, this process does not work. Make change, save, no activity in console, refresh in browser does not reflect the changes. Have to restart npm start for changes to be reflected. A little irritating to say the least.
Anyway idea what might cause this? Really haven't come across anything in my Googling efforts.
If you are using npm in WSL2.0 for development, please refer the last point in this-
https://create-react-app.dev/docs/troubleshooting/#npm-start-doesnt-detect-changes
While WSL1.0 doesn't use a VM, WSL2.0 does use a lightweight VM, so adding
CHOKIDAR_USEPOLLING=true
in a .env file in the project directory fixed the problem.
On a sidenote, you might wanna take a look at this
Client side
To ensure client side changes aren't being cached, you can open devtools > Network, and check "Disable cache". After enabling this, you won't have anything in the cache as long as devtools is open.
Alternatively, you can use incognito / private browsing mode to prevent the cache from holding on to things.
Server side
I'm sure you've realized that it's a pain to restart your server every time you want to see your code update. There are several tools that will detect file changes and handle restarting the server automatically.
PM2
Nodemon
Forever
I just add file .env and inside FAST_REFRESH=false.
For me, working in Windows, WSL2 caused this not to work. Running npm start in Command Prompt, not WSL solved this issue for me.
I'm making an app in the Cloud9 IDE using Node.js with the Express.js framework. Something very odd is happening to a specific .ejs file where if I try to update it (like typing some mumbo jumbo in an h1 tag and then saving and restarting the server), it NEVER gets reflected in the browser no matter what I do. For example, if I delete my jumbotron, save, restart the server, and then refresh the browser, I still see the same page with the jumbotron. I also tried deleting this entire file and then restarting the server and I still see the page and it doesn't break my application which is bizarre. All other .ejs files are fine and I can see the changes that I make.
I've spent about 4 hours trying to figure this out and no one else seems to have my specific issue. I tried clearing my browser cache, using different browsers, logging in/out from Cloud9, creating a new database, going back to older versions of my code, etc. and nothing seems to be working. I'm not even sure what code to post on here since my entire app is about 2000 lines of code so far. Does anyone have any suggestions because this is really frustrating.
My adblock extension was acting buggy, so I uninstalled it. When I went to reinstall it, it got stuck on "Checking". And it never moves past it. Whenever I try to restart the download, it says that I already have it downloading.
I've tried resetting things, I've restarted my browser, signed off of my google account. Everything I can think of and that I've seen suggested.
If anyone reads this, try turning off "Use Hardware Acceleration" in your chrome settings. Use search to find it on settings menu. Fixed the issue on my VM.
There is a discussion in the adblock forum about this issue. I don't know if you have already seen this, but I think it is worth looking at; as there are several suggestions on how to resolve this.
Try the development version.
Change the download location specified in chrome.
Check if you are logged with your users in store.
Hope this helps.
Steps to resolve:
Completely stop Chrome (you'll need to exit Chrome in your task bar even after closing the Chrome window).
Rename your Extension State directory to Extension State.bak.
Restart Chrome.
Below is the path of the Extension State directory on Windows:
C:\Users\<user_name>\AppData\Local\Google\Chrome\User Data\Default\Extension State
See Where does Chrome store extensions? for the Extension State path on other operating systems.
When I update my code, and refresh the page, my server doesn't reflect the changes! It is still loading the old file? (this is running locally). I really don't understand why!
What I mean is that say I make a mistake, or decide to change a line of code. I fix the mistake, or change the line of code. But when I refresh the page, it is as though I have not done so. The mistake or the line of old code still remains behind and that code is ran!
Why?! I am using node's http-server to run my server on a Mac.
Angular sometimes comes with minimizing tools. If this is the case, you have to build your app using these tools to regenerate the files your browser should load.
If not, then probably it is a simple caching issue and you should clear your browser's caches.
In firefox , press Ctrl+Shift+I , then click on the gear (settings icon) ,
look for the option DISABLE CACHE under Advanced Settings , check it , so that it doesn't cache your old code , instead display the new code .
Angular caches your template files. You need to clear the cache, Chrome Developer Tools comes with a setting to disable the cache while the developer tools are open.
Disabling Chrome cache for website development
I've found plenty of versions of this questions, but neither seem to go further than an apparent Google Chrome bug.
What happens is that whenever I copy a codeigniter setup to a new folder on my server, to start a new project based on it, I get "no data received" in any browser I try it on.
The strange part is that the problem is solved if I go into each file that gets include()-d, add or change something irrelevant (like a blank space) and save the file. I don't know why, but this makes that specific include() work. Otherwise, the script stops before it.
There's nothing logged in the server's access or error logs so I can't figure out what the problem might be.
Needless to say this has been driving me crazy. Any suggestions?
Thanks!
My sysadmin figured it out. It was related to system wide APC cache. I used apc_clear_cache() at the top of index.php and everything works like a charm!