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;








9















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?










share|improve this question






























    9















    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?










    share|improve this question


























      9












      9








      9


      2






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 30 '15 at 14:30









      MamaWalter

      1,95311427




      1,95311427










      asked Mar 17 '15 at 17:24









      Jake MoritzJake Moritz

      3481514




      3481514






















          4 Answers
          4






          active

          oldest

          votes


















          14














          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'.






          share|improve this answer

























          • Thank you. Why does that happen only occasionally?

            – rmutalik
            Mar 25 at 0:42


















          9














          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)






          share|improve this answer






























            2














            You can disable cache in Chrome DevTools under "Network".



            Whenever you reload a page while DevTools is open, it will clear the cache.



            disable cache button in chrome devtools






            share|improve this answer
































              1














              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.






              share|improve this answer

























                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
                );



                );













                draft saved

                draft discarded


















                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









                14














                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'.






                share|improve this answer

























                • Thank you. Why does that happen only occasionally?

                  – rmutalik
                  Mar 25 at 0:42















                14














                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'.






                share|improve this answer

























                • Thank you. Why does that happen only occasionally?

                  – rmutalik
                  Mar 25 at 0:42













                14












                14








                14







                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'.






                share|improve this answer















                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'.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                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

















                • 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













                9














                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)






                share|improve this answer



























                  9














                  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)






                  share|improve this answer

























                    9












                    9








                    9







                    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)






                    share|improve this answer













                    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)







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jul 26 '17 at 17:04









                    Lucas LopesLucas Lopes

                    40634




                    40634





















                        2














                        You can disable cache in Chrome DevTools under "Network".



                        Whenever you reload a page while DevTools is open, it will clear the cache.



                        disable cache button in chrome devtools






                        share|improve this answer





























                          2














                          You can disable cache in Chrome DevTools under "Network".



                          Whenever you reload a page while DevTools is open, it will clear the cache.



                          disable cache button in chrome devtools






                          share|improve this answer



























                            2












                            2








                            2







                            You can disable cache in Chrome DevTools under "Network".



                            Whenever you reload a page while DevTools is open, it will clear the cache.



                            disable cache button in chrome devtools






                            share|improve this answer















                            You can disable cache in Chrome DevTools under "Network".



                            Whenever you reload a page while DevTools is open, it will clear the cache.



                            disable cache button in chrome devtools







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Mar 25 at 0:47

























                            answered May 19 '18 at 2:08









                            JBallinJBallin

                            1,5941325




                            1,5941325





















                                1














                                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.






                                share|improve this answer





























                                  1














                                  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.






                                  share|improve this answer



























                                    1












                                    1








                                    1







                                    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.






                                    share|improve this answer















                                    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.







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Jun 21 '18 at 4:26









                                    Shree

                                    13.4k2076125




                                    13.4k2076125










                                    answered Jun 21 '18 at 4:16









                                    kinjal patelkinjal patel

                                    18619




                                    18619



























                                        draft saved

                                        draft discarded
















































                                        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.




                                        draft saved


                                        draft discarded














                                        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





















































                                        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







                                        Popular posts from this blog

                                        Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                                        Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                                        Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript