Bug Tracker

Modify

Ticket #9746 (closed bug: invalid)

Opened 23 months ago

Last modified 23 months ago

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

Reported by: andrew@… Owned by:
Priority: low Milestone: 1.next
Component: ajax Version: 1.6.1
Keywords: Cc:
Blocking: Blocked by:

Description

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>" );

  1. 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:  https://github.com/jquery/jquery/pull/429

Change History

comment:1 Changed 23 months ago by timmywil

  • Priority changed from undecided to low
  • Resolution set to invalid
  • Status changed from new to closed
  • Component changed from unfiled to ajax

Thanks for taking the time to contribute to the jQuery project! This is intended behavior.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.