OSC / ood-fileexplorer

[MOVED] The Open OnDemand File Explorer
https://osc.github.io/Open-OnDemand/
MIT License
4 stars 1 forks source link

Disable caching for GET / HEAD requests #195

Closed MorganRodgers closed 5 years ago

MorganRodgers commented 5 years ago

Caching was causing confusing behavior where Viewed files would only appear updated after refreshing the tab. Quoting the jQuery AJAX docs about the caching key:

If set to false, it will force requested pages not to be cached by the browser. Note: Setting cache to false will only work correctly with HEAD and GET requests. It works by appending "_={timestamp}" to the GET parameters. The parameter is not needed for other types of requests, except in IE8 when a POST is made to a URL that has already been requested by a GET.

Fixes #194.