Created
November 16, 2012 22:01
-
-
Save kingbin/4091294 to your computer and use it in GitHub Desktop.
Backbone - Forcing IE to not cache collections
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myUnicorns = Backbone.Collection.extend({ | |
... | |
fetch: function (options) { | |
options.cache = false; | |
return Backbone.Collection.prototype.fetch.call(this, options); | |
} | |
... | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
HI!
Fetch might be called without any options, so in this case better to use
options = options || {};
options.cache = false;
Of course you know it, but ;-)