wow! it does!
<span style="font-family: courier new,monospace;"> 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 provided
if ( params )
// If it's a function
if ( jQuery.isFunction( params ) ) {
// We assume that it's the callback
callback = params;
params = null;
// Otherwise, build a param string
} else {
params = jQuery.param( params );
type = "<span style="font-weight: bold;">POST</span>";
}
var self = this;
// Request the remote document
jQuery.ajax({
url: url,
type: type,
data: params,
ifModified: ifModified,
complete: function(res, status){
if ( status == "success" || !ifModified && status == "notmodified" )
// Inject the HTML into all the matched elements
self.attr("innerHTML", res.responseText)
// Execute all the scripts inside of the newly-injected HTML
.evalScripts()
// Execute callback
.each( callback, [res.responseText, status, res] );
else
callback.apply
( self, [res.responseText, status, res] );
}
});
return this;
},
</span>
<div><span class="gmail_quote">On 5/18/07, <b class="gmail_sendername">Brian Cherne</b> <<a href="mailto:brian@cherne.net">
brian@cherne.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">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.
<span class="sg">
Brian.
</span><div><span class="q"><span class="gmail_quote">On 5/18/07, <b class="gmail_sendername">Shelane</b> <<a href="mailto:senos@llnl.gov" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
senos@llnl.gov</a>> wrote:</span></span><div><span class="e" id="q_112a06616f60971e_4"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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 <<a href="mailto:walt.stonebur...@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
walt.stonebur...@gmail.com</a>> wrote:
> 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-...>
> -wls
</blockquote></span></div></div>
</blockquote></div>
<br clear="all">
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ