Fix compatibility with jQuery 1.9+
$.browser is gone there, but still we have to disable cache for MSIE.
COUCHDB-1668
diff --git a/jquery.couch.js b/jquery.couch.js
index b7e36f9..db4e8ef 100644
--- a/jquery.couch.js
+++ b/jquery.couch.js
@@ -977,7 +977,7 @@
errorMessage = errorMessage || "Unknown error";
timeStart = (new Date()).getTime();
$.ajax($.extend($.extend({
- type: "GET", dataType: "json", cache : !$.browser.msie,
+ type: "GET", dataType: "json", cache : maybeUseCache(),
beforeSend: function(xhr){
if(ajaxOptions && ajaxOptions.headers){
for (var header in ajaxOptions.headers){
@@ -1058,4 +1058,17 @@
return obj !== null ? JSON.stringify(obj) : null;
}
+ /**
+ * @private
+ */
+ function maybeUseCache() {
+ if (!navigator){
+ return true;
+ }
+ else if (/(MSIE|Trident)/.test(navigator.userAgent)){
+ return false;
+ }
+ return true;
+ }
+
})(jQuery);