YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub

YUI 2.x

Ticket #2528363 (checkedin defect)

Reporter


Kaven Yan
Opened: 11/3/09
Last modified: 11/6/09
Status: checkedin
Type: defect
Resolution: fixed

Owner


Adam Moore
Target Release: 3.1.0
Priority: P3 (normal)
Summary: charset position in script causes a bug in IE
Description:

1. Open http://dancewithnet.com/lab/2009/yui-loader-bug-in-ie/in-gb2312.html in IE, the charset of this page is gb2312. I use YUI to load utf-8.js, it's charset is utf-8 and it is edited by vim, and
it has Simplified Chinese.

2. When you refresh this page, you can look an error tip in IE status bar. Such as http://dancewithnet.com/wp-content/uploads/2009/11/yui-loader-bug-in-ie.png.
The error tip show in YUI 3.0.0 and YUI 2.8.0, but doesn't in YUI2.7.0

3. Maybe it is a bug about IE cache, or the best practice about script element is that charset is before src.
When I load no cache utf-8.js, it is no error.
http://dancewithnet.com/lab/2009/yui-loader-bug-in-ie/random-in-gb2312.html
When I change charset before src in YUI3.0.0, it is no error too.
http://dancewithnet.com/lab/2009/yui-loader-bug-in-ie/fixed-in-gb2312.html

Type: defect Observed in Version: 3.0.0
Component: Loader Severity: S3 (normal)
Assigned To: Adam Moore Target Release: 3.1.0
Location: Library Code Priority: P3 (normal)
Tags: IE,charset Relates To:
Browsers: IE - All
URL: http://dancewithnet.com/lab/2009/yui-lazy-load-bug-in-ie/in-gb2312.html
Test Information:

Attachments

Attachment #1: yui-loader-bug-in-ie.png (download)

Change History

Adam Moore

YUI Developer

Posted: 11/3/09
  • location changed to Library Code
  • milestone changed to 3.1.0
  • priority changed to P3 (normal)
  • status changed from new to accepted

Adam Moore

YUI Developer

Posted: 11/6/09
  • resolution changed to fixed
  • status changed from accepted to checkedin

Attempt to set src last to work around IE issue when setting the charset attribute after the src [fixes #2528363].
View Commit: c7421f70cb77e7b7015facc2472bc4fe8bc52d0e

Adam Moore

YUI Developer

Posted: 11/6/09

Attempt to set src last to work around IE issue when setting the charset attribute after the src [fixes #2528363].
View Commit: c7421f70cb77e7b7015facc2472bc4fe8bc52d0e