]> source.dussan.org Git - vaadin-framework.git/commitdiff
[merge from 6.7] fixes #8492, kickstart script query parameter can now be overridden...
authorAutomerge <automerge@vaadin.com>
Tue, 6 Mar 2012 14:06:05 +0000 (14:06 +0000)
committerAutomerge <automerge@vaadin.com>
Tue, 6 Mar 2012 14:06:05 +0000 (14:06 +0000)
svn changeset:23194/svn branch:6.8

src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java

index 3957c84a715d32c009a06eedb6deadf733d23f66..13082cf1aa328a1230a5a4addf3225b1dd66ff5d 100644 (file)
@@ -1897,7 +1897,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
 
         final String widgetsetFilePath = widgetsetBasePath + "/"
                 + WIDGETSET_DIRECTORY_PATH + widgetset + "/" + widgetset
-                + ".nocache.js?" + new Date().getTime();
+                + ".nocache.js" + createPreventCachingQueryString();
 
         // Get system messages
         Application.SystemMessages systemMessages = null;
@@ -2006,6 +2006,17 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
                 + widgetsetFilePath + "\")};',15000);\n" + "//]]>\n</script>\n");
     }
 
+    /**
+     * To ensure the GWT kickstart scritp is downloaded each time (even if
+     * server caching is not set up right), we add a unique query parameter to
+     * the end of the script file.
+     * 
+     * @return
+     */
+    protected String createPreventCachingQueryString() {
+        return "?" + new Date().getTime();
+    }
+
     /**
      * @return true if the served application is considered to be the only or
      *         main content of the host page. E.g. various embedding solutions