简体   繁体   中英

GWT: How to force client to re-download entire app when new version available?

I'm writing my first GWT/GAE app and thought of an "edge case" where I deploy a new version that dramatically changes the front-end (GWT/JS) code.

If someone is logged in and is actively using my app, and I perform this deployment, I'd like something along to the following things to happen:

  1. Use a modal dialog to flag the user that a new version of the app is available, and that when they click the "OK" button on the dialog the screen will change
  2. They click OK
  3. All work on the current page they are on is saved (somehow - HTML5 persistence maybe?)
  4. They are logged out (necessary?)
  5. The browser downloads the new "version" of the client app (new HTML/JS/CSS)
  6. They are logged back in
  7. They are brought back to the page/state where they last left off, with (hopefully) no work lost

How do other GWT/GAE maestros deal with this use case? Am I on track or way off base? Thanks in advance!

Users don't like to be interrupted for updates: Firefox team learnt that the hard way when they started showing popups. Unless your update fixes a critical security flaw, don't do it.

When you release a new version in GWT, users will load it the next time they visit your website. It's a good idea to close the app after a period of inactivity. Over a short period of time all of your users will move to the next version, and you don't have to do anything to make it happen.

Note that App Engine allows you to specify the default version of your app, but your users can get access to other versions too. This is very useful for situations when you have dramatic changes. The best approach is to invite some users to try a new version. This way you can make sure that the new version works fine, before you make it a default version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM