Bug Tracker

Modify

Ticket #7578 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

$.getScript (ajax 'script' dataType) regression on cache control

Reported by: ambrauer Owned by: jitter
Priority: high Milestone: 1.5
Component: ajax Version: 1.4
Keywords: Cc:
Blocking: Blocked by:

Description

Versions 1.4+ no longer automatically set cache to false if undefined.

The culprit seems to be this line:

if ( s.dataType == "script" && s.cache == null )
    s.cache = false;

which was updated to:

if ( s.dataType === "script" && s.cache === null ) {
    s.cache = false;
}

which no longer evaluates to true (s.cache is undefined, so == will evaluate to true, whereas === to false). No big deal, but maybe this should be noted in the documentation, and/or code removed since it's no longer doing anything.

Only semi-related ticket I could find was this: http://bugs.jquery.com/ticket/3004

Change History

comment:1 Changed 3 years ago by jitter

  • Status changed from new to open

comment:2 Changed 3 years ago by jitter

  • Priority changed from undecided to high
  • Component changed from unfiled to ajax

comment:3 Changed 3 years ago by snover

  • Owner set to jitter
  • Status changed from open to assigned

comment:4 Changed 3 years ago by john

  • Status changed from assigned to closed
  • Resolution set to fixed

Landed.

comment:5 Changed 3 years ago by jitter

#8032 is a duplicate of this ticket.

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.