Hard Refresh in GWT

gwt, java, web-applications

Solution

For reloading the current page you need to call Window.Location.reload() method.

Reloads the current browser window. All GWT state will be lost.

Or you can even specify your own JSNI (below how todo), because by default force reload is false :

  public static native void forceReload() /*-{
      $wnd.location.reload(true);
    }-*/;

Problem

Using Google Web Toolkit, I'd like to code the equivalent of a `hard refresh (control + F5)`. I don't believe (or know) if GWT's `Window.Location` will work. ``` import com.google.gwt.user.client.Window.Location; Window.Location = currentPage; // I don't think it'll be hard refresh ```

Original source