Bug Tracker

Ticket #10093 (closed feature: fixed)

Opened 3 years ago

Last modified 2 years ago

Inconsistent behavior of AJAX when url=""

Reported by: torbasow@… Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

When invoking $.ajax() and url is set to "" Fx4+, O9+, GCh13 and S5 substitute current address (document.location.href) but earlier versions of Fx and IE 6-8 (at least) throw error.

I think this behavior should be aligned through browsers.

Change History

comment:1 Changed 3 years ago by dmethvin

  • Priority changed from undecided to low
  • Status changed from new to open
  • Component changed from unfiled to ajax

Sounds okay with me as long as it doesn't cause other issues. Can any falsy value for url (null, undefined, false, "") be replaced for example?

comment:2 Changed 2 years ago by dmethvin

  • Type changed from enhancement to feature

Bulk change from enhancement to feature.

comment:3 Changed 2 years ago by Ben Truyman

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

Handle a falsy URL in the settings object for jQuery.ajax. Fixes #10093, Closes gh-979

Changeset: ce5784a480ee6dc355fc961ab8bcd5828dabcbb6

Note: See TracTickets for help on using tickets.