http-server icon indicating copy to clipboard operation
http-server copied to clipboard

Problem updating and showing files after refreshing the page

Open emoz41 opened this issue 3 years ago • 3 comments

When I save a javascript file or any file in my project and I refresh the page via ctrl + r, only the html file is updated and no other file is updated

And in order to solve this problem, I have to turn off the http-server and then turn it back on again, so that the files are updated!!

Or sometimes I need to change the type of the whole port, for example, from 8080 to 7070, and that is for one time, because after the update, the problem will return again!!!

So what is this problem?

Environment Versions

  1. windows 7
  2. Node version: v12.18.3
  3. http-server version: v14.1.1

Expected result

[2022-08-25T19:10:29.858Z] "GET /pages/" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.460Z] "GET /pages/home.html" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.539Z] "GET /css/css/fontello-embedded.css" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.546Z] "GET /css/project.css" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.548Z] "GET /css/css/normalize.css" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.558Z] "GET /css/css/slick.css" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.593Z] "GET /js/tools/html5shiv.min.js" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.603Z] "GET /js/project.js" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.609Z] "GET /js/tools/jquery-3.6.0.min.js" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.611Z] "GET /js/tools/jquery.countdown.min.js" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.613Z] "GET /js/tools/slick.min.js" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.688Z] "GET /images/header/logo.png" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.699Z] "GET /images/page-01/part-01/01.png" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.712Z] "GET /images/page-01/part-01/02.png" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.720Z] "GET /images/page-01/part-02/01.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.726Z] "GET /images/page-01/part-04/week.png" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.734Z] "GET /images/page-01/part-05/01.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.745Z] "GET /images/page-01/part-05/02.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.761Z] "GET /images/page-01/part-05/03.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.769Z] "GET /images/page-01/part-05/05.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.774Z] "GET /images/page-01/part-05/06.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.776Z] "GET /images/page-01/part-05/04.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.779Z] "GET /images/page-01/part-06/01.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.783Z] "GET /images/page-01/part-02/02.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.785Z] "GET /images/page-01/part-02/03.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.800Z] "GET /images/page-01/part-03/01.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.805Z] "GET /images/page-01/part-03/02.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.814Z] "GET /images/page-01/part-03/03.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.819Z] "GET /images/page-01/part-03/04.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.845Z] "GET /images/page-01/part-03/05.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.865Z] "GET /images/page-01/part-03/06.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.867Z] "GET /images/page-01/part-03/08.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.870Z] "GET /images/page-01/part-03/07.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.879Z] "GET /images/page-01/part-06/02.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.882Z] "GET /images/page-01/part-06/03.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.885Z] "GET /images/footer/logo.png" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:31.887Z] "GET /images/footer/payment.png" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:47.091Z] "GET /images/page-02/01.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0" [2022-08-25T19:10:47.097Z] "GET /images/page-02/03.jpg" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0"

...

Actual result

[2022-08-25T19:18:06.718Z] "GET /pages/shopping-cart.html" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0"

...

Other information

`D:\project-1\dest λ http-server Starting up http-server, serving ./

http-server version: 14.1.1

http-server settings: CORS: disabled Cache: 3600 seconds Connection Timeout: 120 seconds Directory Listings: visible AutoIndex: visible Serve GZIP Files: false Serve Brotli Files: false Default File Extension: none

Available on: http://192.168.1.10:8080 http://127.0.0.1:8080 Hit CTRL-C to stop the server`

emoz41 avatar Aug 25 '22 19:08 emoz41

I'm having the same issue. It's very annoying. I have to clear the browser cache.

drethedevjs avatar Nov 24 '22 16:11 drethedevjs

@emoz41 If you use VS Code, try using this extension. It's watching for changes in my code. Works great. Looks like http-server doesn't do that. The authors tagged a similar ticket as "out of scope".

drethedevjs avatar Nov 24 '22 16:11 drethedevjs

This issue has been inactive for 180 days

github-actions[bot] avatar May 24 '23 12:05 github-actions[bot]