I'm actually running into that top-level issue myself lately. My system uses websockets to push realtime updates out to the user, and the attached clients all ping every 30 seconds with a "here I am" for the purposes of having user-presence indicators on the site. I was thinking I could respond to that ping with some information about the current build number, and if there was a build number mismatch, call window.reload.
Set the build number in index.html, because the way my system works, at least, the frontend gets rebuilt every time the backend does, and restarting the backend server would increment the build number. That increment would go out in the next ping response (once the websocket connection is re-established), and users who keep a tab open on the screen would get a refresh. The big issue I want to solve first is letting connected users have a chance to close out their current session first. I don't want to refresh them midway through an edit, even if I do have autosave and stuff, random screen refreshes can be annoying. e On Wed, Oct 1, 2014 at 10:29 AM, Rob Koberg <[email protected]> wrote: > I was following this thread for what I think is the same issue Mark > Volkman mentions. If the user never fully reloads the the HTML page > none of the changes would come down. I was thinking server side > requests would need to send down an app version. If the version sent > from the server does not match the currently loaded version, reload > the page. Something like: > > $window.location.reload(true); > > On Wed, Oct 1, 2014 at 8:49 AM, Eric Eslinger <[email protected]> > wrote: > > for me, i use gulp-angular-templatecache, which shoves all my partials > into > > a big JS file so i can pre-load all the templates at load time. That > > resultant templates.js file gets shoved through the same gulp-rev > plugin, so > > it ends up with an md5-based cache busting filename. > > > > e > > > > On Wed, Oct 1, 2014 at 8:28 AM, Daniel Lidström <[email protected]> > wrote: > >> > >> Actually, even the html partials are cached correctly by IIS (not IIS > >> express mind you). From what I can tell it all works fine. > >> — > >> Daniel > >> > >> > >> On Wed, Oct 1, 2014 at 5:23 PM, Mark Volkmann < > [email protected]> > >> wrote: > >>> > >>> I see how this prevents issues with CSS and JavaScript being cached, > but > >>> don't you still have an issue with HTML files being cached? > >>> > >>> On Wed, Oct 1, 2014 at 8:29 AM, Eric Eslinger <[email protected] > > > >>> wrote: > >>>> > >>>> Yeah, I do all my cache busting work with gulp, similar to grunt. In > >>>> production, my main.css and main.js both get a hash string injected > into > >>>> their filename based on their contents, so main-149af3d.css or > whatever. I > >>>> think I use gulp-rev for that. Gulp-inject is configured to modify > >>>> index.html to reflect the filename changes. > >>> > >>> -- > >>> R. Mark Volkmann > >>> Object Computing, Inc. > >>> > >>> -- > >>> You received this message because you are subscribed to a topic in the > >>> Google Groups "AngularJS" group. > >>> To unsubscribe from this topic, visit > >>> https://groups.google.com/d/topic/angular/zjyXjjk_Fq8/unsubscribe. > >>> To unsubscribe from this group and all its topics, send an email to > >>> [email protected]. > >>> To post to this group, send email to [email protected]. > >>> Visit this group at http://groups.google.com/group/angular. > >>> For more options, visit https://groups.google.com/d/optout. > >> > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "AngularJS" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to [email protected]. > >> To post to this group, send email to [email protected]. > >> Visit this group at http://groups.google.com/group/angular. > >> For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "AngularJS" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/angular. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
