Side navigation
#4898 closed feature (invalid)
Opened July 14, 2009 03:57AM UTC
Closed July 14, 2009 01:44PM UTC
Option to disable adding the underscore timestamp parameter to script src
Reported by: | dandv | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.4 |
Component: | ajax | Version: | 1.3.2 |
Keywords: | Cc: | dandv, pbcomm | |
Blocked by: | Blocking: |
Description
I'm trying to append a DOM element of a script with a given 'src' attribute, but jQuery always intercepts that and adds a timestamp parameter. This makes the script's source URL look like
http://judstephenson.com/api/Quotes/Realtime/AAPL/json/callback?_=1247543709724
when running
$("<script src='http://judstephenson.com/api/Quotes/Realtime/AAPL/json/callback'<" + "/script>").appendTo("body");
This breaks the API, and it would be awesome if the automatic timestamping could be disabled.
Attachments (0)
Change History (3)
Changed July 14, 2009 05:07AM UTC by comment:1
Changed July 14, 2009 05:25AM UTC by comment:2
The timestamp is added to prevent caching. You can easily turn that off by setting ajaxSetup cache option to true:
jQuery.ajaxSetup({cache:true});
Changed July 14, 2009 01:44PM UTC by comment:3
cc: | → dandv, pbcomm |
---|---|
component: | unfilled → ajax |
priority: | critical → minor |
resolution: | → invalid |
status: | new → closed |
Yes, pbcomm is right.
A similar issue was reported at http://www.nabble.com/GData-JSON-queries-%22Invalid-query-parameters:_%22-td15901454s27240.html