]> source.dussan.org Git - vaadin-framework.git/commitdiff
#6258 - IE6 does not cache CSS background images
authorArtur Signell <artur.signell@itmill.com>
Fri, 7 Jan 2011 18:19:26 +0000 (18:19 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 7 Jan 2011 18:19:26 +0000 (18:19 +0000)
svn changeset:16826/svn branch:6.5

src/com/vaadin/terminal/gwt/client/ApplicationConfiguration.java

index 281b6f4d16f106f14787ccf7a57727fcf9f610cd..9e062eee8078ba34dc907b4b647757a5d09a8afd 100644 (file)
@@ -371,6 +371,10 @@ public class ApplicationConfiguration implements EntryPoint {
 
     public void onModuleLoad() {
 
+        // Enable IE6 Background image caching
+        if (BrowserInfo.get().isIE6()) {
+            enableIE6BackgroundImageCache();
+        }
         // Prepare VConsole for debugging
         if (isDebugMode()) {
             VDebugConsole console = GWT.create(VDebugConsole.class);
@@ -400,6 +404,19 @@ public class ApplicationConfiguration implements EntryPoint {
         startNextApplication();
     }
 
+    // From ImageSrcIE6
+    private static native void enableIE6BackgroundImageCache()
+    /*-{
+       // Fix IE background image refresh bug, present through IE6
+       // see http://www.mister-pixel.com/#Content__state=is_that_simple
+       // this only works with IE6 SP1+
+       try {
+         $doc.execCommand("BackgroundImageCache", false, true);
+       } catch (e) {
+         // ignore error on other browsers
+       }
+    }-*/;
+
     /**
      * Checks if client side is in debug mode. Practically this is invoked by
      * adding ?debug parameter to URI.