Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File not updating on localhost

I am pulling my hair here. I think I am falling into som really basic stuff but here is my error. I have built a simple webpage with the following "tree-view".

enter image description here

in my readjson.js I read from my json-file stored in json/label.json. However!

Even if I have updated my json-file it reads the FIRST version of the json-file when I started. Using Google Chrome and have tried to refresh the browser, clean my build an so on. Still wont update the json-file on localhost.

Have anyone else run into this and how do I solve it?

like image 681
Joakim M Avatar asked Sep 08 '14 12:09

Joakim M


People also ask

Why xampp is not updating files?

XAMPP does not automatically refresh when you make changes to files. It only provides you with a local server environment. If you want to see changes in your browser, you have to refresh your browser yourself.

How to hard refresh the localhost?

Ctrl + F5 should be enough.

Why js file changes are not reflected in browser?

js and . css files. That is the reason those new changes will not appear to the user. The user either has to clear the browser cookie & reload the page or else he or she has to do a hard refresh of the page by pressing Ctrl+F5.


Video Answer


3 Answers

If anyone is seeing this and none of these solutions work, try running the application with

npm run dev

instead of

npm start

Fixed my issues.

like image 113
Matthew M. Avatar answered Oct 04 '22 11:10

Matthew M.


Have you tried to bring up the developer console (ctr shift j) and right click on the refresh icon using the "Empty Cache and Hard Reload" option?

like image 28
Mr. Brown Avatar answered Oct 17 '22 22:10

Mr. Brown


  1. Ctrl + Shift + Del
  2. Clear all cached data*

In the newer versions of browsers it can be different like clear only files and images cache or something else similar to this.

  1. Ctrl + F5 should be enough.
like image 8
Karmidzhanov Avatar answered Oct 17 '22 23:10

Karmidzhanov