Local server not reflecting updated filesChanging the Image in folder does not reflect changes in browserWriting files in Node.jsCheck synchronously if file/directory exists in Node.jsUsing node.js as a simple web serverHow can I update NodeJS and NPM to the next versions?How do I update Node.js?How do I update each dependency in package.json to the latest version?What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?Meteor local package, phaser game, asset loading?Make body move at same speed in Phaser+P2 and raw P2Phaser Screen goes black without errors
Shouldn't it take more energy to break CO2 compared to CO?
Jam with honey & without pectin has a saucy consistency always
Boss making me feel guilty for leaving the company at the end of my internship
Customize Smartdiagram
Do Veracrypt encrypted volumes have any kind of brute force protection?
Nth term of Van Eck Sequence
Is it possible to install Firefox on Ubuntu with no desktop enviroment?
What does the "titan" monster tag mean?
I received a gift from my sister who just got back from
Why is my Taiyaki (Cake that looks like a fish) too hard and dry?
Has JSON.serialize suppressApexObjectNulls ever worked?
Idiom for 'person who gets violent when drunk"
Background for black and white chart
Can an open source licence be revoked if it violates employer's IP?
Why does there seem to be an extreme lack of public trashcans in Taiwan?
Can I get a photo of an Ancient Arrow?
How to represent jealousy in a cute way?
Would a bit of grease on overhead door cables or bearings cause the springs to break?
Can Mage Hand be used to indirectly trigger an attack?
Manager wants to hire me; HR does not. How to proceed?
What are the advantages of using TLRs to rangefinders?
Lightning Web Component (LWC) not evaluating if:true from test
Harley Davidson clattering noise from engine, backfire and failure to start
Why can't we feel the Earth's revolution?
Local server not reflecting updated files
Changing the Image in folder does not reflect changes in browserWriting files in Node.jsCheck synchronously if file/directory exists in Node.jsUsing node.js as a simple web serverHow can I update NodeJS and NPM to the next versions?How do I update Node.js?How do I update each dependency in package.json to the latest version?What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?Meteor local package, phaser game, asset loading?Make body move at same speed in Phaser+P2 and raw P2Phaser Screen goes black without errors
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm fairly new at user local servers. I'm using the http-server which is a package from Node. I'm using it to host an HTML5 game using the Phaser library. I have image assets I'm using in the game, and I sometimes update these assets. When I do, the changes to the images aren't reflected in the game. I've tried restarting the server but that doesn't help. It usually takes some time for them to update, maybe about an hour. Any ideas what's going wrong?
node.js phaser-framework httpserver
add a comment |
I'm fairly new at user local servers. I'm using the http-server which is a package from Node. I'm using it to host an HTML5 game using the Phaser library. I have image assets I'm using in the game, and I sometimes update these assets. When I do, the changes to the images aren't reflected in the game. I've tried restarting the server but that doesn't help. It usually takes some time for them to update, maybe about an hour. Any ideas what's going wrong?
node.js phaser-framework httpserver
add a comment |
I'm fairly new at user local servers. I'm using the http-server which is a package from Node. I'm using it to host an HTML5 game using the Phaser library. I have image assets I'm using in the game, and I sometimes update these assets. When I do, the changes to the images aren't reflected in the game. I've tried restarting the server but that doesn't help. It usually takes some time for them to update, maybe about an hour. Any ideas what's going wrong?
node.js phaser-framework httpserver
I'm fairly new at user local servers. I'm using the http-server which is a package from Node. I'm using it to host an HTML5 game using the Phaser library. I have image assets I'm using in the game, and I sometimes update these assets. When I do, the changes to the images aren't reflected in the game. I've tried restarting the server but that doesn't help. It usually takes some time for them to update, maybe about an hour. Any ideas what's going wrong?
node.js phaser-framework httpserver
node.js phaser-framework httpserver
edited Mar 30 '15 at 14:30
MamaWalter
1,95311427
1,95311427
asked Mar 17 '15 at 17:24
Jake MoritzJake Moritz
3481514
3481514
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
The browser might be caching your code and/or assets.
In Chrome, with dev tools open (Right click -> Inspect element) you can right click on the refresh button and 'empty cache and hard reload'.
Thank you. Why does that happen only occasionally?
– rmutalik
Mar 25 at 0:42
add a comment |
There's a option -c
that refers to the cache time (max-age) in seconds [3600]
(e.g. -c10
for 10 seconds).
To disable caching, use http-server -c-1
You can see more information by enter http-server -h
(for help)
add a comment |
You can disable cache in Chrome DevTools under "Network".
Whenever you reload a page while DevTools is open, it will clear the cache.
add a comment |
You can try to use live-server
instead. It works for me.
npm install live-server -g
And you can start it simply by the command live-server
.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29105729%2flocal-server-not-reflecting-updated-files%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
The browser might be caching your code and/or assets.
In Chrome, with dev tools open (Right click -> Inspect element) you can right click on the refresh button and 'empty cache and hard reload'.
Thank you. Why does that happen only occasionally?
– rmutalik
Mar 25 at 0:42
add a comment |
The browser might be caching your code and/or assets.
In Chrome, with dev tools open (Right click -> Inspect element) you can right click on the refresh button and 'empty cache and hard reload'.
Thank you. Why does that happen only occasionally?
– rmutalik
Mar 25 at 0:42
add a comment |
The browser might be caching your code and/or assets.
In Chrome, with dev tools open (Right click -> Inspect element) you can right click on the refresh button and 'empty cache and hard reload'.
The browser might be caching your code and/or assets.
In Chrome, with dev tools open (Right click -> Inspect element) you can right click on the refresh button and 'empty cache and hard reload'.
edited Jan 7 '17 at 22:25
answered Apr 5 '15 at 15:08
tonyedwardspztonyedwardspz
1,01221635
1,01221635
Thank you. Why does that happen only occasionally?
– rmutalik
Mar 25 at 0:42
add a comment |
Thank you. Why does that happen only occasionally?
– rmutalik
Mar 25 at 0:42
Thank you. Why does that happen only occasionally?
– rmutalik
Mar 25 at 0:42
Thank you. Why does that happen only occasionally?
– rmutalik
Mar 25 at 0:42
add a comment |
There's a option -c
that refers to the cache time (max-age) in seconds [3600]
(e.g. -c10
for 10 seconds).
To disable caching, use http-server -c-1
You can see more information by enter http-server -h
(for help)
add a comment |
There's a option -c
that refers to the cache time (max-age) in seconds [3600]
(e.g. -c10
for 10 seconds).
To disable caching, use http-server -c-1
You can see more information by enter http-server -h
(for help)
add a comment |
There's a option -c
that refers to the cache time (max-age) in seconds [3600]
(e.g. -c10
for 10 seconds).
To disable caching, use http-server -c-1
You can see more information by enter http-server -h
(for help)
There's a option -c
that refers to the cache time (max-age) in seconds [3600]
(e.g. -c10
for 10 seconds).
To disable caching, use http-server -c-1
You can see more information by enter http-server -h
(for help)
answered Jul 26 '17 at 17:04
Lucas LopesLucas Lopes
40634
40634
add a comment |
add a comment |
You can disable cache in Chrome DevTools under "Network".
Whenever you reload a page while DevTools is open, it will clear the cache.
add a comment |
You can disable cache in Chrome DevTools under "Network".
Whenever you reload a page while DevTools is open, it will clear the cache.
add a comment |
You can disable cache in Chrome DevTools under "Network".
Whenever you reload a page while DevTools is open, it will clear the cache.
You can disable cache in Chrome DevTools under "Network".
Whenever you reload a page while DevTools is open, it will clear the cache.
edited Mar 25 at 0:47
answered May 19 '18 at 2:08
JBallinJBallin
1,5941325
1,5941325
add a comment |
add a comment |
You can try to use live-server
instead. It works for me.
npm install live-server -g
And you can start it simply by the command live-server
.
add a comment |
You can try to use live-server
instead. It works for me.
npm install live-server -g
And you can start it simply by the command live-server
.
add a comment |
You can try to use live-server
instead. It works for me.
npm install live-server -g
And you can start it simply by the command live-server
.
You can try to use live-server
instead. It works for me.
npm install live-server -g
And you can start it simply by the command live-server
.
edited Jun 21 '18 at 4:26
Shree
13.4k2076125
13.4k2076125
answered Jun 21 '18 at 4:16
kinjal patelkinjal patel
18619
18619
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f29105729%2flocal-server-not-reflecting-updated-files%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown