Browse files

Prevented caching ajax requests on reconnect.

This commit fixes an issue when SignalR triest to reconnect after a webserver has returned an error page with client side caching enabled.

In this case, SignalR caches the response of the webserver, which results in many requests per second being fired but each request results with a 304 (not modified status code), without ever accessing the server.

In case of IE7-IE9, this will eventually crash the browser.

It's solved by adding a 'cache:false' in the pollXhr ajax parameters (already present in the negotiate).
  • Loading branch information...
1 parent 0a44575 commit fbfc65371d0febbd822fcfff134edf5c083a78e1 @zidad zidad committed Jun 29, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −0 SignalR/Scripts/jquery.signalR.js
  2. +1 −1 SignalR/Scripts/jquery.signalR.min.js
@@ -1057,6 +1057,7 @@
instance.pollXhr = $.ajax({
url: url,
global: false,
+ cache: false,
type: "GET",
dataType: connection.ajaxDataType,
success: function (data) {
Oops, something went wrong.

0 comments on commit fbfc653

Please sign in to comment.