XAMPP is not updating .html/.js files on reload - html

I recently installed XAMPP on a windows machine(Windows 10) just to get a local server up and running so that I could make API calls and not run into any CORS issues and it was working fine.
Now what is happening is that whenever I make any changes in the .html or .js files it won't update the page, I have cleared all the browser history , temp files, restarted XAMPP, closed and reopened the browser (in the root folder there is only a single .html file so no clash there) but still it won't update.
Is it something related to XAMPP(v3.2.2) or any local settings that I have to configure.
Browser: Chrome 65, though it is the same issue with firefox and IE.

It can be due to serve caches. You need to clear those caches. Go to browsing history and clear there or you can just right click on the reload button on chrome and click hard reload and cache clear.

When this happens to me I usually do (if you're using Mac) SHIFT + Cmd + R and if that doesn't work i close the tab (Chrome) and open a new one.

Related

Why Live Server is not opening the browser or loading

I am new to VSCode and Web Designing. I downloaded live server to load my websites directly, but when i click on golive then nothing happens. No browser opens up and even if I open it manually then click on go live nothing happens. I have auto save turned on to 1000ms so then it must work right? I am using latest stable version of VSCode and latest version of live server(OS Windows 8). Please help me if you can I am trying to open it in Google Chrome. Here is my settings.json -
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"files.autoSave": "afterDelay",
"liveServer.settings.donotShowInfoMsg": true,
"liveServer.settings.AdvanceCustomBrowserCmdLine": ""
}
I encounter the same problem but when I go to the live server setting. at the Live Server › Settings: Https I changed the value of enable to false. Then it works fine with chrome. Otherwise you have to change the https to http because others browser use http for the link
PS: make sure you install live-server extension in chrome also
It is because you have added insufficient paths in your Environmental variables.
First you can do is close the vs code
Go to the properties of My Pc
Click on Advanced Settings
click on Environmental Variables
from there you can add path clicking the path variables in the table shown there
6 . Add a new line to the path and copy paste the path of your system 32
C:\Windows\System32
hope this solution works in your case
this is happening to me, and It opens the tab but won't load even after 24+ hours. You have to close VS and the browser tab, then open VS again and wait to open live server. However long you have to wait is dependent on how good your computer is.

Chrome is using a cached page when local-serving for web-development

I'm using a node.js local server to serve Chrome a three.js page, and Chrome instead of updating the page when I reload it after I've done some changes, it reloads a cached version instead, and will only update it after I clear all history, then close and re-open the dumb Chrome, which is extremely frustrating and inefficient. That doesn't happen with Firefox. Any ideas?
node.js server run on a .bat file inside the working folder:
http-server -p 8000
exit
on address bar:
http://localhost:8000/mypage.html

Chrome loading cached files on localhost

I'm having this problem across 2 different machines now.
Version 63.0.3239.84 (Official Build) (64-bit)
OSX 10.12.6
Chrome is persistently loading old cached files on http://localhost:3000. The only way I can stop it, is to use incognito. If I use cmd + shift + r it works for a single refresh, then goes back to the old files on reload.
I typically have the inspector up so I've tried ticked disable cache, that doesn't nothing. I've also tried deleting my cached files through chrome's settings, that does nothing.
Anything I'm missing here?
Finally realised what it was. A previous server I was running on that port had a manifest file and the appropriate service workers. It means that chrome was loading those cached files by default.
To fix it I went into developer tools > application > clear storage.
It now works as expected.
Are you sure is it a chrome cache? I mean, check if its really chrome cache getting the full of data in another way like curl, for example:
curl http://localhost:3000
If the content still not reloaded is not chrome problem but another think like your webserver.
If you are running Nginx don't worry it is Nginx configuration called sendfile and you can change it easily just doing this follow steps:
Step 1 - Open nginx configuration with your text editor(vim in my case)
vim /etc/nginx/nginx.conf
Step 2 - Search the line with this text:
sendfile on;
Step 3 - Change to off
sendfile off;
Step 4 - Restart your nginx:
/etc/init.d/nginx restart
Note: If you are using virtual environment like Vagrant reload it
vagrant reload
In my case, Chrome was generating local overrides, for some reason. Before discovering this, I switched ports several times to get past the issue. Chrome had created a local override for my index.html file for each port. After deleting the local overrides, the actual from the server started coming through just fine.

Possible to view yesterday's version of a hopefully cached JavaScript file in Chrome?

Using Chrome 61. iCloud Drive mysteriously seems to have reverted a JavaScript file I worked a long time on to a previous version (before I did a git commit). I had viewed this file repeatedly in Chrome (srced from an html page). Is it possible Chrome still has a copy of this somewhere?
Any other way I could possible recover this file? iCloud Drive doesn't appear to have revision history as I thought (I can only recover deleted files).
Pheww, I got it!
Shut down my web server
Loaded the page in Chrome
Chrome expectedly reported the server refused the connection
Clicked view page source
There it was!

Live Reload not working (WIN7)

I have the windows application installed, Live Reload extension for chrome and i'm using Sublime Text with Live Refresh and Live Reload plugins. For some reason any HTML doc i edit on sublime text is not auto updating on chrome. The extension is stuck on "Live Reload is connecting" when i enable it. What exactly am i missing, do i need to setup a local web server or something like that?
I think your issue may be that you did not add the folder that contains your HTML document to the LiveReload windows application so that it can monitor for changes to the file.
If you open up the LiveReload app, it should have a list of site folders. Try adding your test project's folder to the list.
If you load from local file it does work you must runt the local file through a web server e.g python -m http.server in the folder your .html exists otherwise the option match to local file never appears and then you can have the save and reload functionality.
I mention it because I hadn't found the problem through reading the post