Ajax.Request ... does requestHeaders: ['cache-control','no-cache','pragma','no-cache'], apply to both GET and PUT operations? Can I ensure a page I retrieve will not be cached by the browser using Ajax.Request, GET? Sam
on 10.08.2006 00:35
on 10.08.2006 02:26
One sure fire way to prevent caching is to include a cache buster in your request URL... var cacheBuster = "?" + new Date() * 1; var url = yourURL + cacheBuster; ...do Request...
on 15.08.2006 14:18
Thanks for the suggestion. I'll give it a try. Sam _____ From: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:rails-spinoffs-bounces@lists.rubyonrails.org] On Behalf Of Ryan Gahl Sent: Wednesday, August 09, 2006 2:31 PM To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] requestHeaders: ['cache-control', 'no-cache','pragma', 'no-cache'], One sure fire way to prevent caching is to include a cache buster in your request URL... var cacheBuster = "?" + new Date() * 1; var url = yourURL + cacheBuster; ...do Request... On 8/9/06, Sam <sam.google@iness.com> wrote: Ajax.Request ... does requestHeaders: ['cache-control','no-cache','pragma','no-cache'], apply to both GET and PUT operations? Can I ensure a page I retrieve will not be cached by the browser using Ajax.Request, GET? Sam
on 15.08.2006 14:19
...oops, this should be obvious, but replace the ? with a "&c=" (or something) if your url already contains other parameters... you'll figure that part out I'm sure...