eead98b5207d2413138457fdd4131d01dbdf0b7d
tdreszer
  Thu Aug 18 12:24:20 2011 -0700
The reload on dirty page can be called earlier for FF and Chrome, but IE still relies upon the slower approach of full load then reload.
diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 1757c39..df4e722 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -1389,30 +1389,31 @@
         thisForm=$("FORM");
     if($(thisForm).length > 1 )
         thisForm=$(thisForm)[0];
     if(thisForm != undefined && $(thisForm).length == 1) {
         //alert("posting form:"+$(thisForm).attr('name'));
         return postTheForm($(thisForm).attr('name'),obj.href);
     }
     return true;
 }
 
 $(document).ready(function()
 {
     // The page may be reached via browser history (back button)
     // If so, then this code should detect if the image has been changed via js/ajax
     // and will reload the image if necessary.
+    // NOTE: this is needed for IE but other browsers can detect the dirty page much earlier
     if (isDirtyPage()) {
         // mark as non dirty to avoid infinite loop in chrome.
         $('#dirty').val('false');
         jQuery('body').css('cursor', 'wait');
             window.location = "../cgi-bin/hgTracks?hgsid=" + getHgsid();
             return false;
         }
     initVars();
     var db = getDb();
     if(jQuery.fn.autocomplete && $('input#suggest') && db) {
         if(newJQuery) {
             $('input#suggest').autocomplete({
                                                 delay: 500,
                                                 minLength: 2,
                                                 source: ajaxGet(function () {return db;}, new Object, true),