Opened 14 years ago
Closed 14 years ago
#4898 closed feature (invalid)
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.
Change History (3)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
The timestamp is added to prevent caching. You can easily turn that off by setting ajaxSetup cache option to true:
jQuery.ajaxSetup({cache:true});
comment:3 Changed 14 years ago by
Cc: | dandv pbcomm added |
---|---|
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