Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I hate to say this, your approach is correct and professional, but I'd be tempted to just leave it.</p> <p>The consequences of not fixing this is that IE6 users will notice their machine getting slower and slower and ultimately either crashing completely or more likely crashing IE6.</p> <p>So what?</p> <p>Really - <em>why is this your problem?</em></p> <p>Yours definitely won't be the only site they visit with this leak, and they will see IE6 crash regularly regardless of what you do, because that's what it does. </p> <p>It's unlikely that anyone still on IE6 could even point out your application as one that leaks. </p> <p>Finally when IE6 does crash it reports IE6 as the culprit - you can legitimately point out that this is a bug in IE6 that Microsoft have fixed in a new release.</p> <p>Your expensive time is better spent on improving the application for the users not trapped in legacy hell - your app should basically work for IE6 users, but this sort of issue can suck away all of your time and not fix their problem. IE6 is still going to be an unsupported, crash ridden, security hole of a browser.</p> <p>I suspect the jQuery devs take a similar view to me. Also you have to do some really ugly stuff to get round this bug in IE6, including hacky DOM work that stops the leak but is actually much slower.</p> <hr> <p><strong>Update</strong></p> <p>Ok, this isn't an easy problem to fix - MS describe the IE6 bug (and provide advice on how to fix it) here: <a href="http://msdn.microsoft.com/en-us/library/bb250448(VS.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/bb250448(VS.85).aspx</a></p> <p>Basically this isn't a problem with javascript or jQuery - the actual issue is with the IE6 DOM - when HTML elements are added to the page (by javascript, rather than being in the page when it loads) IE can't garbage collect them unless they are created in a very specific way.</p> <p>This is back to front from how jQuery UI builds elements (see DOM insertion order bug in the link above) and so this isn't something that either the jQuery devs or you can easily fix.</p> <p>So how do you fix the issue? Well, you can stick with the legacy pop-up calendar for IE6 or you can write your own one. </p> <p>I would recommend the former, but if you really want to built the latter there are some basic rules to follow:</p> <ol> <li><p>Always add elements top-down - for instance if you want to built a table add the <code>&lt;table&gt;</code> element into the page's DOM, then add <code>&lt;tr&gt;</code> then <code>&lt;td&gt;</code> and so on. This is back to front as it's much quicker to build the entire table and then add it to the DOM - unfortunately that's where IE6 loses track of it.</p></li> <li><p>Only use CSS and HTML 3.2 attributes - sounds dumb, but IE6 creates extra objects to store the extra attributes (or 'expando' properties) and these also leak.</p></li> <li><p>Kinda related to (2), but as @gradbot mentions IE6 has problems garbage collecting javascript variables - if they reference a DOM element inside an event fired from that element you can get problems. This is also compounded by javascript references to DOM elements that have 'expando' properties.</p></li> </ol> <p>If you have a look around online there may already be a drop-down DHTML calendar that sticks to these rules - it won't be as pretty, quick or configurable as the jQuery UI one, but I'm sure I've seen it done without leaking in IE6.</p> <p>I think the best bet is to keep as much static as possible - for instance you could load the calendar grid (week numbers and day column headings) with the page and then dynamically load in the numbers (and nothing else). Create the day numbers as links, with javascript in the href - not best practice normally but far less likely to leak in IE6.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload