Prevent back navigation caching in IE 11 / Fix for $.browser.msie
authorAlexander Ebert <ebert@woltlab.com>
Sat, 7 Dec 2013 12:27:33 +0000 (13:27 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 7 Dec 2013 12:27:33 +0000 (13:27 +0100)
com.woltlab.wcf/templates/headInclude.tpl
wcfsetup/install/files/js/WCF.js

index cb72ff88403d174ba87895c128d5a21c06023816..e6675d96df5c72345173988261c0574651c44c02 100644 (file)
                {if $__sessionKeepAlive|isset}
                        new WCF.System.KeepAlive({@$__sessionKeepAlive});
                {/if}
+               
+               if ($.browser.msie) {
+                       window.onbeforeunload = function() {
+                               /* Prevent "Back navigation caching" (http://msdn.microsoft.com/en-us/library/ie/dn265017%28v=vs.85%29.aspx) */
+                       };
+               }
        });
        //]]>
 </script>
index 13dbd73c3f42edaa7323d6eb7c458f1caf8e7229..7059049953ac970c0a6540e7b1ac8352cdacf963 100755 (executable)
@@ -159,6 +159,12 @@ String.prototype.hashCode = function() {
        
        // CKEditor support (disabled for Android & Windows Phone)
        jQuery.browser.ckeditor = (navigator.userAgent.match(/(Android|Windows Phone)/i)) ? false : true;
+       
+       // properly detect IE11
+       if (jQuery.browser.mozilla && ua.match(/trident/)) {
+               jQuery.browser.mozilla = false;
+               jQuery.browser.msie = true;
+       }
 })();
 
 /**