Skip to main content

Bug Tracker

Side navigation

#8212 closed bug (worksforme)

Opened February 08, 2011 04:41PM UTC

Closed February 09, 2011 05:10PM UTC

Attach script load/readystatechange before script.src in cross-site ajax request

Reported by: dmethvin Owned by:
Priority: low Milestone: 1.next
Component: ajax Version: 1.5
Keywords: needsreview Cc: jaubourg
Blocked by: Blocking:
Description

IE can sometimes fire ready right after script.src is set if the file is in cache. Just need to move the set below the attach of the handlers.

http://www.thefutureoftheweb.com/blog/image-onload-isnt-being-called

https://github.com/jquery/jquery/blob/master/src/ajax/script.js#L51

Attachments (0)
Change History (4)

Changed February 08, 2011 04:54PM UTC by jitter comment:1

cc: → jaubourg
component: unfiledajax
priority: undecidedlow

This sounds interesting but needs extensive testing across all supported browsers (which with this caching issues is a pain) as, judging by the comments on the blog post, this may not be fool proof and could start failing in other browsers other randomly.

Changed February 08, 2011 07:39PM UTC by rwaldron comment:2

keywords: → needsreview

Changed February 09, 2011 12:06AM UTC by jaubourg comment:3

While I would understand the behaviour for Image, I seriously doubt this would apply to script tags seeing as they're not loaded before the tag is injected into the document afaik. I may be wrong but I never ran into the problem before. Do you have tests to back this up, Dave?

Changed February 09, 2011 05:10PM UTC by dmethvin comment:4

resolution: → worksforme
status: newclosed

In creating some tests I don't see it failing in IE6 or IE8 so I will close this.