Skip to main content

Bug Tracker

Side navigation

#7134 closed bug (wontfix)

Opened October 08, 2010 03:21PM UTC

Closed October 08, 2010 07:21PM UTC

script tags seem not to load when site is in another domain

Reported by: jaraco Owned by:
Priority: undecided Milestone: 1.4.3
Component: unfiled Version: 1.1.4
Keywords: jsonp Cc:
Blocked by: Blocking:

From what I understand, one cannot use XmlHttpRequest (and thus .ajax) for cross-site script requests (for security reasons), but one can use <script> tags and jsonp.

With 1.1.4, however, it appears as if jQuery silently ignores <script> tags that reference scripts in another domain. I've created a simple example html file.

<script src="jquery-1.1.4.js" type="text/javascript">
<script type="text/javascript">
var url = ''
$('head').append('<script src="' + url + '">')

You can view simplealert.js, but all it does is make a javascript alert call, so one can tell if it was called or not.

Executing the above HTML results in no alert called (the javascript isn't requested). If, however, one uses instead, the request completes as expected.

If I understand correctly, this means it is not possible to implement JSONP in jQuery 1.1.4.

There's no mention of this behavior change in the release notes, and there are no longer any tickets under bugs closed for 1.1.4.

Is this limitation by design? I understand this may be closed as won't fix, but I wanted to be sure to capture the issue so it's documented somewhere.

Attachments (0)
Change History (1)

Changed October 08, 2010 07:21PM UTC by snover comment:1

resolution: → wontfix
status: newclosed

1.1.4 is ancient and not supported. Upgrade.