So then since the cross domain scripts are fetched by adding a script
tag.
All of the above methods for turning caching on/off via the ajax
settings do not apply?
The cross domain script acquisition appears to ALWAYS have the cache
busting on.
Is there a place to request as a feature maybe in n
> Can you clarify if - in FACT- setting cache:true will affect
> $.getScript() when it is getting the script from a different domain?
> (and perhaps what technique $.getScript uses under the covers for the
> cross domain case?)
>
> Also - the direct use of the cache parameter in an $.ajax( options
Thanks for the discussion and clarifications.
I am still fuzzy on one thing
(besides the fact that much of this is undocumented - and i could find
NOTHING in the documentations that indicate that AjaxSetup would
affect getScript in any way... much less the specifics of how)
I am interested 80%
By default, jQuery's ajax functions _don't_ use the cache busting
addition. The getScript() is actually an exception because of IE. (see
the documentation: http://docs.jquery.com/Ajax/jQuery.ajax#toptions)
There probably could be be some better documentation, as you said,
noting the cache option
Karl Rudd wrote on 5/14/2008 5:28 PM:
The ajaxSetup() options affect all subsequent calls. The random cache
busting value should no longer be appended.
Thank you for the clarification.
Firefox and Internet Explorer will obey the cache headers sent by the server for the
requested content (as
ajaxSetup is global.
A solution with less potential side-effects would just use $.ajax
directly, specifying the cache option along with url, dataType and
success:
$.ajax({
cache: true,
dataType: "json"
url: "something.js"
success: callbackFunc
});
>From the code
The ajaxSetup() options affect all subsequent calls. The random cache
busting value should no longer be appended.
Karl Rudd
On Thu, May 15, 2008 at 8:16 AM, Bil Corry <[EMAIL PROTECTED]> wrote:
>
> Karl Rudd wrote on 5/14/2008 5:00 PM:
>>
>> jQuery.ajaxSetup({ cache: true });
>
> Does setting t
Karl Rudd wrote on 5/14/2008 5:00 PM:
jQuery.ajaxSetup({ cache: true });
Does setting the cache option affect all subsequent XHR requests (or just the immediate
one)? And is the entire effect of setting cache to "true" that the random
value is no longer appended to the URL?
- Bil
This is already possible, though the documentation for it is a bit spread out.
You'll need to use:
jQuery.ajaxSetup({ cache: true });
jQuery.getScript('something.js', callbackFunc);
Documentation:
http://docs.jquery.com/Ajax/jQuery.ajaxSetup
http://docs.jquery.com/Ajax/jQuery.ajax (Opt
9 matches
Mail list logo