When Printing Kills

Published 12 years, 11 months ago

Here’s a fascinating little tidbit: on some users’ machines, attempts to print out Joe Clark‘s ALA article “Facts and Opinions About PDF Accessibility” would crash Internet Explorer.  The error message mentioned a script error in line 1401: “Object doesn’t support this property or method”.  Funny thing: we weren’t doing any scripting.  The error was actually occurring shdoclc.dll/preview.dlg, which is of course a piece of the operating system.

Jason did some sleuthing and traced the crash to this line of markup:

<h2 id="tags">Tags and structure</h2>

Honestly, that was it.  So Jeffrey renamed the ID to read:

<h2 id="structure">Tags and structure</h2>

So far as we know, no more crashing in Explorer.

Ain’t browsers a slice?

(And yes, we’re aware of the clamor for a print style sheet.  More on this later.)

Update: Marten Veldthuis from Strongpsace points out that 37signals ran into a very similar problem in Backpack.  Details can be found in Jamis Buck‘s June 3rd post ie-is-teh-3v1lSpread the word: “tags” is effectively a reserved keyword, even though no such concept exists in (X)HTML.  Use it at your (users’) peril.


  1. Wow, more problems with id=”tags”? 37Signals also had problems with it in Backpack, Jamis blogged it up a little while ago.

  2. […] rinting Kills…”>

    Having trouble printing a web page in IE? Perhaps might be the reason why. Talk about random.

    This […]

  3. ahhh… but did you spin clockwise or counterclockwise 3 times before you clucked like a chicken, hopped up and down on one leg and started typing?

  4. Death by ID

    Why Joe Clark’s ALA article “Facts and Opinions About PDF Accessibility” wouldn’t print in IE

  5. […] Web Stuff – Saturday, August 27th 2005 As Eric Meyer posted this a couple of hours ago, and I find this funny, I’m going to post this […]

  6. Is this related to Microsoft’s abandoned plan to include Smart Tags based on the words in a web page?

  7. Hey, good tip, I think I have to change a site of mine

  8. Printing website kills machine, news at eleven!

    Turns out that Internet Explorer throws a big wobbly if you try to print a webpage which uses “tags” as an id. Who knew? I’d be quite interested to know how they went about sleuthing out that it was the tags id that was the problem, especially since…

  9. IE Bug

    嗯,其實是 hlb 布丁長輩 在 irc 上渡化大眾:
    21:51 <@hlb> gslin: 長輩知道讓 IE crash 的新方法嗎? id=”tags” :p
    21:51 <@gslin> @_@
    21:51 <@hlb> gslin: print preview 就爛掉 :p
    21:51 <@gslin&g…

  10. Utskrift om�jligt i IE

    CSS-gurun Eric Meyer har uppt�ckt en egenhet i Internet Explorers utskriftshantering. Tydligen �r v�rdet tags i id-attributet ett reserverat v�rde. Men varken i HTML- eller XHTML-specifikationen st�r det n�got om detta. Internet Explorer har �nd� valt…

  11. Firefox for Web Design

    Many reasons (extensions) for using Firefox when designing for the Web

  12. Unfortunately, I’m having a similar problem with Firefox on a site I’m working on, printing causes Firefox to lock up. I have to kill the process to use it again. Anybody know of any specific issues I should be aware of?

  13. Under Microsoft’s DHTML, I guess tags would be a reserved word.

    Because they have that pesky document.all collection, which introduces the tags method, which is akin to document.getElementsByTagName. If you have an element with an id=”foo” then document.all.foo would be a reference to that element.

    if you have an element with an id=”tags”, then document.all.tags is now a reference to that element, and no longer a method of the document.all object.

    It seems this is also true of the other document.all methods ( item, namedItem, and urns ). If you create a simple HTML page with a button whose onclick=”alert(document.all.item)”, clicking the button you will get something like:
    function item(){
    [native code]
    }

    If you add an element with id=”item” then run the test again, you will see [object].

    I don’t know if all four of these keywords will have side-effects like breaking printing, but they certainly would break javascript in unexpected ways if that javascript tries to use micorsoft’s document.all object.

  14. Kevin– I wondered if it would have something to do with Microsoft’s document.tags. Your point about the other keywords is one I hadn’t taken into consideration, though. Time to construct some test cases. Thanks!

  15. […] 是他把上述代码更换成 Tags and structure 以后,IE又可以正常工作。所以Eric总结出,原来”tags”这段代码,可以让IE崩

  16. […] 是他把上述代码更换成 Tags and structure 以后,IE又可以正常工作。所以Eric总结出,原来”tags”这段代码,可以让IE崩

  17. Why does Microsoft keep making certain works reserved words. Does that MSSmartTagsPreventParsing set to “true” not fix that issue?

  18. Printing website kills IE

    Even a simple CSS ID-tag can crash Microsoft Internet Explorer…

  19. That is sad..

  20. […] rinting website kills IE Notes Even a simple CSS ID-tag can crash Microsoft Internet Explorer…. Update: […]

  21. I also ran into an IE CSS oddity when doing some JavaScript on my own site.

    The comment live preview code I use relies on an <input id="author" /> tag. Seems like a reasonable choice for an ID, right? Well once I added a <meta name="author" /> tag my JavaScript stopped working and I got the same “Object doesn”t support this property or method” message.

    From what I could gather, IE would return the meta tag to a getElementById call. Unfortunately, I haven’t had time to really research further into this problem. Maybe I should make some time…

  22. […] e ever seen. Don’t ever put the words tags in your id attributes. Eg: id=”tags” Visit Site   Comments are closed. […]

  23. […] he same error that I helped a colleague with some time back, but through different means. Check it out

    Recent Posts
    […]

  24. […] omentarios (0) Una breve nota de utilidad pública vía Eric Meyer: si no quieres que los usuarios de Internet Explorer sufran una caí […]

  25. […] text id=”tags”, dann bricht der IE den Druck genau bei dieser Zeile. Weitere Infos gibt es hier. Stichwörter: keine « Blogsysteme als Alternative| […]

  26. […] ; al atributo id de un elemento, en algunas PCs Internet Explorer har

  27. […] IE Reserved ID? IE

  28. […] ken des Facts and Opinions About PDF Accessibility-A LIST Apart-Artikels von Joe Clark zum Absturz des Internet Explorers. Eric Meyer geh

  29. […]

    Otro error de IE para la lista, ¡ouch!

    S […]

  30. […] ebe a que la palabra “tags” es una palabra exclusiva del navegador Internet Explorer. Otros sitios se hacen eco de lo mismo. La solución es muy sencilla, no uses E […]

  31. I have seen this a few times before with other words used for id’s.
    If only I had thought to keep a note of them …

  32. This is nearly identical to the Netscape 4.x bug that prevented form submission if the submit button had the attribute name=”submit” (not Submit, just submit).

  33. […] Pedrianes. « El iArm Otro error en IE Se ha confirmado que no se p […]

  34. […] ted Web browser standards support Interview with Dan Cederholm Writing Semantic Markup When Printing Kills Using the AIS Web Accessibility Toolbar Sony site in stan […]

  35. […] this wasn’t enough, Eric Meyer mentioned a very interesting phenomena a while back: some valid [X]HTML actually kills Internet Explorer. It’s not colloquial […]

  36. […] ted Web browser standards support Interview with Dan Cederholm Writing Semantic Markup When Printing Kills Using the AIS Web Accessibility Toolbar Sony site in stan […]

  37. Crashing IE6

    While testing sites I rarely have taken the opportunity to test printing on all browsers/platforms. Well the other day a client comes back to me and claims that their site has been crashing and always has when trying to print.Here is the problem:* sit…

  38. Tags ! That’s it !
    I could kiss you.

  39. Just run into this problem myself. Our user’s couldn’t print our online docs… hmm, I had never had any probs in Firefox…

    Bloody IE! Bloody Microsoft! I’ve wasted a good couple of hours on this…

  40. I appologise for previous comments as trying to put the html tags which are breaking IE while printing. It breaks IE6 and IE7 but works on firefox.

    <div>
    <input type="radio" disabled="disabled" checked="checked"/>Some
    </div>
    <table>
    <tr>
    <td>
    <font color="black">File Number:</font></td>
    </tr>
    </table>

  41. […] When Printing Kills (tags: ie bug printing) […]

  42. I have my web page designed using DIVs. It also has a Display Tag component (JSP Taglib) which produces a grid using TABLE tab. When I issue print command (Ctrl-P) from this page, and chooses to have landscape mode, IE6 crashes. For Portrait mode, it works fine. I am not using tags as the div id or name. I have Windows 2003 Server running IE6 browser. No separate printing CSS is being used.
    Any pointers?

  43. […] Este error, aunque parezca mentira, lleva documentado desde 2005 […]

  44. Some more reserved Ids:

    On Internet Explorer 6, using id = ‘type’ or ‘description’ or ‘positioning’ will cause ie to crash if you try to access them via document.getElementByID….

    That sucks

  45. […] I decide to investigate and sure enough Google comes through. Specific tags in your html code will cause Internet Explorer to crash when you try to print. […]

Leave a Comment

Management reserves the right to edit or remove any comment, especially when abusive or irrelevant to the topic at hand. HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <em> <i> <q cite=""> <s> <strong> <pre class=""> <kbd>


Comment Preview

If you're satisfied with what you've written, then go ahead...