[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Bil Corry
Bil Corry wrote on 5/18/2007 11:16 AM: So it might be possible to enable caching in FF with the headers, something to play with I guess. It is possible, at least in IE7 and FF2, to have it cache the AJAX call via the Expires header. The demo is the last button:

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread [EMAIL PROTECTED]
Just a word to the wise, but "Expires: -1" will trip up some proxies. HTTP/1.1 clients are supposed to treat invalid date formats as being in the past -- but they don't always get it right. It is safer to use an actual date: Expires: Thu, 01 Dec 1994 16:00:00 GMT On May 17, 2:04 pm, Bil C

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Shelane Enos
I actually hadn’t dug through the jQuery code itself. So that’s saying that if I enter any additional parameter to the server, it will send a POST request? That may be good for me in most cases. On 5/18/07 11:24 AM, "?ⓐⓚⓔ" <[EMAIL PROTECTED]> wrote: > wow! it does! > load: function( url, p

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Ⓙⓐⓚⓔ
wow! it does! load: function( url, params, callback, ifModified ) { if ( jQuery.isFunction( url ) ) return this.bind("load", url); callback = callback || function(){}; // Default to a GET request var type = "GET"; // If the second parameter was p

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Shelane Enos
I just look at a page where I have .load and firebug shows GET. On 5/18/07 11:14 AM, "Brian Cherne" <[EMAIL PROTECTED]> wrote: > It's not documented (as far as I can tell) but if you send a params object to > .load() it should be sent via the POST method. I'm looking at the unpacked > source of

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Bil Corry
Dan G. Switzer, II wrote on 5/18/2007 10:57 AM: One thing to remember is to check your browser's cache settings. I always have mine set to check for newer version with "every visit." That said, I just turned IE6 to "Automatic" and got the following: Button #1: Cached Button #2: Not Cached Butt

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Brian Cherne
It's not documented (as far as I can tell) but if you send a params object to .load() it should be sent via the POST method. I'm looking at the unpacked source of jQuery 1.1.1... load: starts on line 1842 and the GET/POST condition starts on line 1849. Brian. On 5/18/07, Shelane <[EMAIL PROTECTE

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Shelane Enos
Yep, Jason Huck did an awesome presentation at the Lasso Summit and that's why I'm here in this jQuery community now. On 5/18/07 10:55 AM, "Bil Corry" <[EMAIL PROTECTED]> wrote: > > ?ⓐⓚⓔ wrote on 5/18/2007 10:41 AM: >> looks like you got the headers

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Dan G. Switzer, II
Bil, >> You MUST add a variable to the url: + new Date().getTime(); > >I setup a simple test with three AJAX calls using load. One loads a page >without any no-cache directives, one loads a page with no-cache directives >and one loads a page by using an unique url (appends the time to the url).

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread stylo~
>>What if you don't care if its cached, or would actually like it to be cached? If you refer to my post, I suggested an option to not cache, so would be cached if not specified, as it should be. Trust me (or trust google), headers won't always work even if you got ie7 to behave. The url trick is

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Bil Corry
Ⓙⓐⓚⓔ wrote on 5/18/2007 10:41 AM: looks like you got the headers perfect! What is a Lasso/8? Lasso is the middleware language I use (similar to PHP): At a recent developer conference, jQuery was presented and made a believer out of many of us, so expect

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Ⓙⓐⓚⓔ
looks like you got the headers perfect! What is a Lasso/8? ServerLasso/8Mime-Version1.0Content-Typetext/html; charset=UTF-8Expires-1 Last-ModifiedFri, 18 May 2007 17:39:42 GMTCache-Controlno-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0Pragma no-cacheVary*Et

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Bil Corry
stylo~ wrote on 5/17/2007 10:11 PM: You MUST add a variable to the url: + new Date().getTime(); I setup a simple test with three AJAX calls using load. One loads a page without any no-cache directives, one loads a page with no-cache directives and one loads a page by using an unique url (a

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Ⓙⓐⓚⓔ
What if you don't care if its cached, or would actually like it to be cached? GET is GET, and POST is POST I think it would be nice if firefox & safari cached my GETs POST is so much better for passing parameters... they don't get logged in the apache logs and you don't have length limits.

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread Shelane
It would be nice if the .load function of jQuery did a POST request instead of a GET request or if we could specific that it should be a POST request. On May 18, 8:10 am, wls <[EMAIL PROTECTED]> wrote: > You're correct. IE is caching GETs. The work around is to make a > unique GET (e.g., all th

[jQuery] Re: IE Caching AJAX calls

2007-05-18 Thread wls
You're correct. IE is caching GETs. The work around is to make a unique GET (e.g., all the date/time bogus parameters) or to use POST instead. See http://www.wwco.com/~wls/blog/2007/04/12/an-advanced-crash-course-in-ajax/ -wls

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread stylo~
Big problem on Opera too. Don't bother with headers, they don't work and are more difficult. You MUST add a variable to the url: + new Date().getTime(); Easy enough to add to your calls, but I'm surprised it's still not in the ajax function as an option because a common problem. Earlier threads

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Jimmy Glass
com Subject: [jQuery] Re: IE Caching AJAX calls When in doubt, whack'em all. Pragma: no-cache Cache-control: no-cache, must-revalidate Expires: (some date in the past in the proper format) Jimmy Glass wrote: > Hi Jeff, > That is what I was thinking... But, I'm not sure of the key

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Bil Corry
Charles Capps wrote on 5/17/2007 11:51 AM: When in doubt, whack'em all. Pragma: no-cache Cache-control: no-cache, must-revalidate Expires: (some date in the past in the proper format) I'm not sure which one IE follows, but here's mine: Expires: -1 Last-Modified: Thu, 17 May

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Charles Capps
ou know? > > Jimmy G > > > > > > *From*: "Jeffrey Kretz" <[EMAIL PROTECTED]> > *Sent*: Thursday, May 17, 2007 11:19 AM > *To*: jquery-en@googlegroups.com > *Subject*: [jQu

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Jimmy Glass
:[EMAIL PROTECTED] On Behalf Of Gordon Sent: Thursday, May 17, 2007 11:07 AM To: jQuery (English) Subject: [jQuery] Re: IE Caching AJAX calls One trick I found was to simply do: $.get (myUrl + '?uid=' + math.random(), myAjaxCallBack) On May 17, 5:49 pm, "Jimmy Glass" wrote:

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Jeffrey Kretz
: Thursday, May 17, 2007 11:07 AM To: jQuery (English) Subject: [jQuery] Re: IE Caching AJAX calls One trick I found was to simply do: $.get (myUrl + '?uid=' + math.random(), myAjaxCallBack) On May 17, 5:49 pm, "Jimmy Glass" <[EMAIL PROTECTED]> wrote: > Hi... > So... I

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Gordon
One trick I found was to simply do: $.get (myUrl + '?uid=' + math.random(), myAjaxCallBack) On May 17, 5:49 pm, "Jimmy Glass" <[EMAIL PROTECTED]> wrote: > Hi... > So... I just noticed that IE is caching my AJAX requests (I code to Firefox, > and then test IE later). I expect some of you have ru

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Gordon
On May 17, 5:58 pm, Emil Ivanov <[EMAIL PROTECTED]> wrote: > You mentioned one of the solutions - to append something like '? > param=' + new Date(); > > The other thing you can do is use POST, since IE won't cache POST > request. I've tried telling it with headers, that it should not cache > it

[jQuery] Re: IE Caching AJAX calls

2007-05-17 Thread Emil Ivanov
You mentioned one of the solutions - to append something like '? param=' + new Date(); The other thing you can do is use POST, since IE won't cache POST request. I've tried telling it with headers, that it should not cache it, but it still does, so POST is the solution. Regards, Emil Ivanov On