madrobby/zepto — Issue #307: bypass cache
Author: Filirom1
Created: 2011-11-08 16:18:16+00:00
State: open

Hi,

I have some issues with PUT requests being cached and not sent with Zepto.

My application detect if the user-agent is a mobile webkit, and in this case, load Zepto instead of jQuery.

Unfortunately jQuery has a cache attribute not present on Zepto.
http://api.jquery.com/jQuery.ajax/

So I use the trick given my Mozilla to bypass the cache :
url += ((/\?/).test(url) ? "&" : "?") + (new Date()).getTime()
https://developer.mozilla.org/En/Using_XMLHttpRequest

I am alone with cache issues ? How do you manage it ?
I can do a pull request if you want to integrate it into zepto.

Cheers
Romain