Skip to main content

Bug Tracker

Side navigation

#9746 closed bug (invalid)

Opened July 05, 2011 05:49PM UTC

Closed July 06, 2011 01:39PM UTC

domManip incorrectly adds "?_=NNNN" to passed <script>s

Reported by: Owned by:
Priority: low Milestone:
Component: ajax Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Tested in Firefox 5 on Linux with jQuery 1.6.1.

Steps to reproduce:

1. Run the following code (e.g. in the Firebug command-line):

$(document.body).append( "<script src='foo.js'></script>" );

2. Observe the URL that was loaded.

Observed: .../foo.js?_=1309887155209

Expected: .../foo.js

Explanation: domManip() calls evalScript(), which in turns calls $.ajax() without specifying "cache: true". $.ajax() adds a parameter to the script elements to force it not to be cached.

A patch is available here:

Attachments (0)
Change History (1)

Changed July 06, 2011 01:39PM UTC by timmywil comment:1

component: unfiledajax
priority: undecidedlow
resolution: → invalid
status: newclosed

Thanks for taking the time to contribute to the jQuery project!

This is intended behavior.