Angular app has to clear cache after new deploymentAngular page reload issue due to browser cacheWhy angular delete its output directory folder?How to force the browser to reload cached CSS/JS files?Prevent RequireJS from Caching Required ScriptsNew deployment, have browser cache cleared the first time the page is loadedEnterprise app deployment doesn't work on iOS 7.1Clear Angular JS templateCache once (for each deployment)How to clear cache of service worker?Laravel deployment with capistrano cache filesImplement caching in a way that on new build upload no cache clearing requiredAngular Clear Cache On updateUpdated code not reflecting after deployment Angular 4

Why does this image of Jupiter look so strange?

Does "as soon as" imply simultaneity?

Norwegian refuses EU delay (4.7 hours) compensation because it turned out there was nothing wrong with the aircraft

Meaning of 小せェサル in the following sentence

How to manage expenditure when billing cycles and paycheck cycles are not aligned?

Functional analysis of the Pink Panther

1, 2, 4, 8, 16, ... 33?

What is the size of a set of sets of the empty set , , ?

How do pilots align the HUD with their eyeballs?

Strange Sticky Substance on Digital Camera

Do we know the situation in Britain before Sealion (summer 1940)?

Two trains move towards each other, a bird moves between them. How many trips can the bird make?

What's the next step in this Unequal (Futoshiki) puzzle?

What's the lowest risk highest reward I can invest in for 5 years?

Cut a cake into 3 equal portions with only a knife

Can an integer optimization problem be convex?

A high quality contribution but an annoying error is present in my published article

Could Apollo astronauts see city lights from the moon?

Is there a way to hide HTML source code yet keeping it effective?

What is the need of methods like GET and POST in the HTTP protocol?

A food item only made possible by time-freezing storage?

Is "ln" (natural log) and "log" the same thing if used in this answer?

How do I deal with too many NPCs in my campaign?

My manager quit. Should I agree to defer wage increase to accommodate budget concerns?



Angular app has to clear cache after new deployment


Angular page reload issue due to browser cacheWhy angular delete its output directory folder?How to force the browser to reload cached CSS/JS files?Prevent RequireJS from Caching Required ScriptsNew deployment, have browser cache cleared the first time the page is loadedEnterprise app deployment doesn't work on iOS 7.1Clear Angular JS templateCache once (for each deployment)How to clear cache of service worker?Laravel deployment with capistrano cache filesImplement caching in a way that on new build upload no cache clearing requiredAngular Clear Cache On updateUpdated code not reflecting after deployment Angular 4






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















We have an Angular 6 application. It’s served on Nginx. And SSL is on.



When we deploy new codes, most of new features work fine but not for some changes. For example, if the front-end developers update the service connection and deploy it, users have to open incognito window or clear cache to see the new feature.



What type of changes are not updated automatically? Why are they different from others?



What’s the common solution to avoid the issue?










share|improve this question






























    2















    We have an Angular 6 application. It’s served on Nginx. And SSL is on.



    When we deploy new codes, most of new features work fine but not for some changes. For example, if the front-end developers update the service connection and deploy it, users have to open incognito window or clear cache to see the new feature.



    What type of changes are not updated automatically? Why are they different from others?



    What’s the common solution to avoid the issue?










    share|improve this question


























      2












      2








      2


      2






      We have an Angular 6 application. It’s served on Nginx. And SSL is on.



      When we deploy new codes, most of new features work fine but not for some changes. For example, if the front-end developers update the service connection and deploy it, users have to open incognito window or clear cache to see the new feature.



      What type of changes are not updated automatically? Why are they different from others?



      What’s the common solution to avoid the issue?










      share|improve this question














      We have an Angular 6 application. It’s served on Nginx. And SSL is on.



      When we deploy new codes, most of new features work fine but not for some changes. For example, if the front-end developers update the service connection and deploy it, users have to open incognito window or clear cache to see the new feature.



      What type of changes are not updated automatically? Why are they different from others?



      What’s the common solution to avoid the issue?







      javascript angular nginx deployment






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 28 at 16:37









      zhangjinzhouzhangjinzhou

      7235 silver badges30 bronze badges




      7235 silver badges30 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          5
















          The problem is When a static file gets cached it can be stored for very long periods of time before it ends up expiring. This can be an annoyance in the event that you make an update to a site however, since the cached version of the file is stored in your visitors’ browsers, they may be unable to see the changes made.



          Cache-busting solves the browser caching issue by using a unique file version identifier to tell the browser that a new version of the file is available. Therefore the browser doesn’t retrieve the old file from cache but rather makes a request to the origin server for the new file.



          Angular cli resolves this by providing an --output-hashing flag for the build command.



          Check the official doc : https://angular.io/cli/build



          Example



          ng build --aot --output-hashing=all


          Below are the options you can pass in --output-hashing



          • none: no hashing performed

          • media: only add hashes to files processed via [url|file]-loaders

          • bundles: only add hashes to the output bundles

          • all: add hashes to both media and bundles





          share|improve this answer



























          • It works. Thank you for the solution. Could you please explain what situations could cause the problem? As I mentioned, the problem doesn't happen to all updates.

            – zhangjinzhou
            Mar 28 at 18:18











          • @zhangjinzhou updated the answer with explanation , please mark it as answer if it helps you

            – Joel Joseph
            Mar 29 at 6:28











          • Thanks for the explanation!

            – zhangjinzhou
            Mar 29 at 17:16











          • I have the same issue. After each build/deployment I have to clear cache. Could you please tell me where should I add the above command?In angular side or devOps side?

            – Anand Raj
            Sep 4 at 7:07













          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/4.0/"u003ecc by-sa 4.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%2f55402751%2fangular-app-has-to-clear-cache-after-new-deployment%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          5
















          The problem is When a static file gets cached it can be stored for very long periods of time before it ends up expiring. This can be an annoyance in the event that you make an update to a site however, since the cached version of the file is stored in your visitors’ browsers, they may be unable to see the changes made.



          Cache-busting solves the browser caching issue by using a unique file version identifier to tell the browser that a new version of the file is available. Therefore the browser doesn’t retrieve the old file from cache but rather makes a request to the origin server for the new file.



          Angular cli resolves this by providing an --output-hashing flag for the build command.



          Check the official doc : https://angular.io/cli/build



          Example



          ng build --aot --output-hashing=all


          Below are the options you can pass in --output-hashing



          • none: no hashing performed

          • media: only add hashes to files processed via [url|file]-loaders

          • bundles: only add hashes to the output bundles

          • all: add hashes to both media and bundles





          share|improve this answer



























          • It works. Thank you for the solution. Could you please explain what situations could cause the problem? As I mentioned, the problem doesn't happen to all updates.

            – zhangjinzhou
            Mar 28 at 18:18











          • @zhangjinzhou updated the answer with explanation , please mark it as answer if it helps you

            – Joel Joseph
            Mar 29 at 6:28











          • Thanks for the explanation!

            – zhangjinzhou
            Mar 29 at 17:16











          • I have the same issue. After each build/deployment I have to clear cache. Could you please tell me where should I add the above command?In angular side or devOps side?

            – Anand Raj
            Sep 4 at 7:07















          5
















          The problem is When a static file gets cached it can be stored for very long periods of time before it ends up expiring. This can be an annoyance in the event that you make an update to a site however, since the cached version of the file is stored in your visitors’ browsers, they may be unable to see the changes made.



          Cache-busting solves the browser caching issue by using a unique file version identifier to tell the browser that a new version of the file is available. Therefore the browser doesn’t retrieve the old file from cache but rather makes a request to the origin server for the new file.



          Angular cli resolves this by providing an --output-hashing flag for the build command.



          Check the official doc : https://angular.io/cli/build



          Example



          ng build --aot --output-hashing=all


          Below are the options you can pass in --output-hashing



          • none: no hashing performed

          • media: only add hashes to files processed via [url|file]-loaders

          • bundles: only add hashes to the output bundles

          • all: add hashes to both media and bundles





          share|improve this answer



























          • It works. Thank you for the solution. Could you please explain what situations could cause the problem? As I mentioned, the problem doesn't happen to all updates.

            – zhangjinzhou
            Mar 28 at 18:18











          • @zhangjinzhou updated the answer with explanation , please mark it as answer if it helps you

            – Joel Joseph
            Mar 29 at 6:28











          • Thanks for the explanation!

            – zhangjinzhou
            Mar 29 at 17:16











          • I have the same issue. After each build/deployment I have to clear cache. Could you please tell me where should I add the above command?In angular side or devOps side?

            – Anand Raj
            Sep 4 at 7:07













          5














          5










          5









          The problem is When a static file gets cached it can be stored for very long periods of time before it ends up expiring. This can be an annoyance in the event that you make an update to a site however, since the cached version of the file is stored in your visitors’ browsers, they may be unable to see the changes made.



          Cache-busting solves the browser caching issue by using a unique file version identifier to tell the browser that a new version of the file is available. Therefore the browser doesn’t retrieve the old file from cache but rather makes a request to the origin server for the new file.



          Angular cli resolves this by providing an --output-hashing flag for the build command.



          Check the official doc : https://angular.io/cli/build



          Example



          ng build --aot --output-hashing=all


          Below are the options you can pass in --output-hashing



          • none: no hashing performed

          • media: only add hashes to files processed via [url|file]-loaders

          • bundles: only add hashes to the output bundles

          • all: add hashes to both media and bundles





          share|improve this answer















          The problem is When a static file gets cached it can be stored for very long periods of time before it ends up expiring. This can be an annoyance in the event that you make an update to a site however, since the cached version of the file is stored in your visitors’ browsers, they may be unable to see the changes made.



          Cache-busting solves the browser caching issue by using a unique file version identifier to tell the browser that a new version of the file is available. Therefore the browser doesn’t retrieve the old file from cache but rather makes a request to the origin server for the new file.



          Angular cli resolves this by providing an --output-hashing flag for the build command.



          Check the official doc : https://angular.io/cli/build



          Example



          ng build --aot --output-hashing=all


          Below are the options you can pass in --output-hashing



          • none: no hashing performed

          • media: only add hashes to files processed via [url|file]-loaders

          • bundles: only add hashes to the output bundles

          • all: add hashes to both media and bundles






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 29 at 6:35

























          answered Mar 28 at 16:56









          Joel JosephJoel Joseph

          1,6361 gold badge14 silver badges23 bronze badges




          1,6361 gold badge14 silver badges23 bronze badges















          • It works. Thank you for the solution. Could you please explain what situations could cause the problem? As I mentioned, the problem doesn't happen to all updates.

            – zhangjinzhou
            Mar 28 at 18:18











          • @zhangjinzhou updated the answer with explanation , please mark it as answer if it helps you

            – Joel Joseph
            Mar 29 at 6:28











          • Thanks for the explanation!

            – zhangjinzhou
            Mar 29 at 17:16











          • I have the same issue. After each build/deployment I have to clear cache. Could you please tell me where should I add the above command?In angular side or devOps side?

            – Anand Raj
            Sep 4 at 7:07

















          • It works. Thank you for the solution. Could you please explain what situations could cause the problem? As I mentioned, the problem doesn't happen to all updates.

            – zhangjinzhou
            Mar 28 at 18:18











          • @zhangjinzhou updated the answer with explanation , please mark it as answer if it helps you

            – Joel Joseph
            Mar 29 at 6:28











          • Thanks for the explanation!

            – zhangjinzhou
            Mar 29 at 17:16











          • I have the same issue. After each build/deployment I have to clear cache. Could you please tell me where should I add the above command?In angular side or devOps side?

            – Anand Raj
            Sep 4 at 7:07
















          It works. Thank you for the solution. Could you please explain what situations could cause the problem? As I mentioned, the problem doesn't happen to all updates.

          – zhangjinzhou
          Mar 28 at 18:18





          It works. Thank you for the solution. Could you please explain what situations could cause the problem? As I mentioned, the problem doesn't happen to all updates.

          – zhangjinzhou
          Mar 28 at 18:18













          @zhangjinzhou updated the answer with explanation , please mark it as answer if it helps you

          – Joel Joseph
          Mar 29 at 6:28





          @zhangjinzhou updated the answer with explanation , please mark it as answer if it helps you

          – Joel Joseph
          Mar 29 at 6:28













          Thanks for the explanation!

          – zhangjinzhou
          Mar 29 at 17:16





          Thanks for the explanation!

          – zhangjinzhou
          Mar 29 at 17:16













          I have the same issue. After each build/deployment I have to clear cache. Could you please tell me where should I add the above command?In angular side or devOps side?

          – Anand Raj
          Sep 4 at 7:07





          I have the same issue. After each build/deployment I have to clear cache. Could you please tell me where should I add the above command?In angular side or devOps side?

          – Anand Raj
          Sep 4 at 7:07




















          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%2f55402751%2fangular-app-has-to-clear-cache-after-new-deployment%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

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현