Revision: 9753
Author: [email protected]
Date: Fri Feb 18 14:32:34 2011
Log: Do not put "?serial=0" at the end of the URL for the first fetch attempt on a runAsync fragement. Preserve it for later attempts.
- Improves caching.
- Makes it easier to write HTML5 manifests, do prefetching, etc, where stable URLs are needed.

Review at http://gwt-code-reviews.appspot.com/1358804

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=9753

Modified:
/trunk/user/src/com/google/gwt/core/client/impl/CrossSiteIframeLoadingStrategy.java

=======================================
--- /trunk/user/src/com/google/gwt/core/client/impl/CrossSiteIframeLoadingStrategy.java Mon Oct 11 09:55:46 2010 +++ /trunk/user/src/com/google/gwt/core/client/impl/CrossSiteIframeLoadingStrategy.java Fri Feb 18 14:32:34 2011
@@ -157,8 +157,12 @@
    * to cache a download failure.
    */
   private String getUrl(int fragment) {
+    // Not appending serial=N to the first attempt improves proxy caching
+    // and makes it easier to write HTML5 AppCache manifests.
+    int serial = getSerial(fragment);
+    String parameters = ((serial == 0) ? "" : ("?serial=" + serial));
     return GWT.getModuleBaseURL() + getDeferredJavaScriptDirectory()
- + GWT.getPermutationStrongName() + "/" + fragment + ".cache.js?serial="
-        + getSerial(fragment);
+        + GWT.getPermutationStrongName() + "/" + fragment + ".cache.js"
+        + parameters;
   }
 }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to