Answers: <p>Here is what works for us.</p>
  
  <p>We have a "version" file deployed with the application itself. Then, application issues a "check version" request periodically that checks if the version that the application has initially loaded is different from the version specified in this version file. If it is different, we show a notification that there is a new version available and suggest to refresh the browser window to get it. </p>
  
  <p>I think that's what Google Inbox, for example, does. They have this periodic <code>checkJsVersion</code> request and, if there is a newer version of the web app available, they show this information box on the bottom left with a "New version is available, hit Refresh to get it" button.</p>
  
  <p>There is also a different approach when the information about a new version of the app is <em>pushed from the server to the client</em>. </p>
  
Answers: CC BY-SA 3.0
Answers: 2017-11-15T22:44:58.690Z
Answers: Makes sense, I'm going to give it a try, I also really like the idea of prompting the user to refresh when they're at a good stopping point.
Answers: RandomUs1r
Answers: CC BY-SA 3.0
Answers: 2017-11-15T01:13:23.653Z
Answers: 2017-11-15T01:19:11.130Z
Answers: 2017-11-15T01:19:11.130Z
Answers: alecxe
Body: <p>I have an <code>Angular / Web Api 2</code> site that uses <code>ui-router</code> for SPA behaviour and <code>gulp</code> for file transformations.  </p>
  
  <p>There is an issue where when I release the site, the user has to refresh their browser to view new content (usually). I have cache busting implemented on my <code>js / css</code> files, but it seems that the <code>HTML</code> views themselves are a problem.  At the same time I can't help feel like I'm missing something blatantly obvious here.  </p>
  
  <p>How do I get my tech stack to refresh the user's content (eg. when adding a new field to an existing form) so that the user receives the most up to date version of the site after release?</p>
  
Comments: CC BY-SA 3.0
Comments: 2017-11-15T17:13:26.723Z
Comments: Did you try using versioned query parameters? Described here: https://stackoverflow.com/a/119056/4495081. The example is for a script, but it *should* work for html just as well.
Comments: Dan Cornilescu
Comments: CC BY-SA 3.0
Comments: 2017-11-15T18:15:51.797Z
Comments: @Dan yep, I'm using gulp cache busting to generate a hash for my scripts & css files. Ex. https://www.npmjs.com/package/gulp-cache-buster
Comments: RandomUs1r
Comments: CC BY-SA 3.0
Comments: 2017-11-15T18:43:05.120Z
Comments: Exactly, IMHO you could use the same technique, except with a version # which you maintain as you wish - for example changing it only when you add a field to the respective form.
Comments: Dan Cornilescu
Comments: CC BY-SA 3.0
Comments: 2017-11-15T22:43:09.380Z
Comments: @Dan it sounds like I should introduce versioning and version detection via gulp / angular js then.  I also really like alexcxe's idea of prompting the user to refresh rather than forcing it.
Comments: RandomUs1r
Tags: <release-management>
Title: How to refresh user's content of the site after release?
UserDisplayName: RandomUs1r
ThreadText: # How to refresh user's content of the site after release?
  
  (Asked by: username_0 on 2017-11-14)
  
  I have an `Angular / Web Api 2` site that uses `ui-router` for SPA behaviour and `gulp` for file transformations.
  
  There is an issue where when I release the site, the user has to refresh their browser to view new content (usually). I have cache busting implemented on my `js / css` files, but it seems that the `HTML` views themselves are a problem. At the same time I can't help feel like I'm missing something blatantly obvious here.
  
  How do I get my tech stack to refresh the user's content (eg. when adding a new field to an existing form) so that the user receives the most up to date version of the site after release?
  
  **Tags:** release-management
  
  > **Comments:**
  > **username_1**: Did you try using versioned query parameters? Described here: https://stackoverflow.com/a/119056/4495081. The example is for a script, but it *should* work for html just as well.  
  > **username_0**: @Dan yep, I'm using gulp cache busting to generate a hash for my scripts & css files. Ex. https://www.npmjs.com/package/gulp-cache-buster  
  > **username_1**: Exactly, IMHO you could use the same technique, except with a version # which you maintain as you wish - for example changing it only when you add a field to the respective form.  
  > **username_0**: @Dan it sounds like I should introduce versioning and version detection via gulp / angular js then.  I also really like alexcxe's idea of prompting the user to refresh rather than forcing it.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-11-15. Score: 4 | Accepted answer
  
  Here is what works for us.
  
  We have a "version" file deployed with the application itself. Then, application issues a "check version" request periodically that checks if the version that the application has initially loaded is different from the version specified in this version file. If it is different, we show a notification that there is a new version available and suggest to refresh the browser window to get it.
  
  I think that's what Google Inbox, for example, does. They have this periodic `checkJsVersion` request and, if there is a newer version of the web app available, they show this information box on the bottom left with a "New version is available, hit Refresh to get it" button.
  
  There is also a different approach when the information about a new version of the app is *pushed from the server to the client*.
  
  > **Comments:**
  > **username_0**: Makes sense, I'm going to give it a try, I also really like the idea of prompting the user to refresh when they're at a good stopping point.  
  
  ---
  
  