06d7be056190c14b85e71bc12523f18ea6815b5e markd Mon Dec 7 00:50:29 2020 -0800 BLAT mmap index support merge with master diff --git src/hg/js/ajax.js src/hg/js/ajax.js index b448d00..c913857 100644 --- src/hg/js/ajax.js +++ src/hg/js/ajax.js @@ -182,37 +182,32 @@ var track = getTrack(); if (track && track.length > 0) data = data + "&g=" + track; for(var ix=0; ix<names.length; ix++) { data = data + "&" + encodeURIComponent(names[ix]) + "=" + encodeURIComponent(values[ix]); } var type; // We prefer GETs so we can analyze logs, but use POSTs if data is longer than a // (conservatively small) maximum length to avoid problems on older versions of IE. if ((loc.length + data.length) > 2000) { type = "POST"; } else { type = "GET"; } - if (typeof bowser === 'undefined') { - bowserScript = document.createElement('script'); - bowserScript.setAttribute('src', 'https://cdnjs.cloudflare.com/ajax/libs/bowser/1.6.1/bowser.min.js'); - document.head.appendChild(bowserScript); - } - if (!async || (typeof bowser !== 'undefined' && bowser.msie)) { + if (!async || (typeof navigator.sendBeacon == 'undefined')) { // XmlHttpRequest is used for all synchronous updates and for async updates in IE, // because IE doesn't support sendBeacon. If access to bowser is blocked, the default // is to assume the browser is not IE. $.ajax({ type: type, async: async, url: loc, data: data, trueSuccess: function () {}, success: catchErrorOrDispatch, error: errFunc, cache: false }); } else {