Suppressing "There are updates ready to be installed. Would you like to res

Hi!

When I upload a new webapp context to a tomcat every client browser (that visited this webapp before) gets the message “There are updates ready to be installed. Would you like to restart now?” (Please take a look at the attached screenshot as well). I found out that it originates from the widgetset and is part of the compiled widgetset.

I am searching for a way to suppress this message and instead to directly load the new widgetset without the user need to click “OK”. Is there a way to do that?

The reason why I am searching for a way to disable it is twofold:

  1. The design of the alert box is really ugly and not conform to any other design we have :slight_smile:
  2. After I click “OK” the page is not reloaded properly - it just stuck.

So, the question is wether there is a way to disable and directly reload the app or, if that is not possible, to add a design to this message.

Any ideas
17414.jpg

Never saw this message before, but if you want to redesign it there’s an easy way to find out if you can do it or not:

Load page in chrome/firefox, right click the element and choose “Inspect Element”. If you can do that then it is an HTML element and it will show you the code of that element and the styles. There you can play around with the styles.

If you can edit the styles so the design changes you can overwrite it by adding the class/id to your stylesheet and overwrite the values with !important.

Example:
original class says

border-radius: 10px;
border: 1px solid red;

new class

border: none !important;

But this seems to be in combination with Touchkit, i didnt work with that yet, so my answer might not help much.

Well - thats part of the problem: It is not part of the webpage but a plain “alert”-Box from the Browser… as if you would state

JavaScript.execute(“alert(‘There are updates ready to be installed. Would you like to restart now?’)”);

I did not find the solution yet…

With a little help of vaadin here is the solution:
#####################
Hi!

There are some options depending on your needs.

If you don’t need offline features at all you can simply disable cache manifest altogether:TouckKitSettings.getApplicationCacheSettings().setCacheManifestEnabled(false);

If you want to make the updating automatic you can get rid of the confirmation:CacheManifestStatusIndicator.setConfirmationRequired(false);

Or you can use GWT’s replace-with to implement your own version ofCacheManifestStatusIndicator.java, although you should be careful to not remove any other parts by accident.
###############################

We decided to use the first option (CacheManifestStatusIndicator.setConfirmationRequired(false):wink: - it worked like a charm!

Where has this line:
CacheManifestStatusIndicator.setConfirmationRequired(false);
to be put? Which class/method?