Bug Tracker

Opened 10 years ago

Closed 10 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:2 Changed 10 years ago by pbcomm

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 10 years ago by flesler

Cc: dandv pbcomm added
Component: unfilledajax
Priority: criticalminor
Resolution: invalid
Status: newclosed

Yes, pbcomm is right.

Note: See TracTickets for help on using tickets.