{"id":214,"date":"2003-10-21T21:37:23","date_gmt":"2003-10-22T01:37:23","guid":{"rendered":"https:\/\/www.goer.org\/wordpress\/worst_tag_ever"},"modified":"2003-10-21T21:37:23","modified_gmt":"2003-10-22T01:37:23","slug":"worst_tag_ever","status":"publish","type":"post","link":"https:\/\/www.goer.org\/Journal\/2003\/10\/worst_tag_ever.html","title":{"rendered":"Worst. Tag. Ever."},"content":{"rendered":"<blockquote>\n<p><cite>&#8220;Rest assured, I was on the Internet within minutes, registering my disgust throughout the world.&#8221;<\/cite><\/p>\n<\/blockquote>\n<p>So far, this week has not been a great week, technology-wise.<\/p>\n<p>First, this week&#8217;s award for Kookiest Third-Party Documentation goes to <a href=\"http:\/\/www.junit.org\/\" title=\"Perfectly good unit testing software, by the way\">JUnit.org<\/a>, for their rather creative <a href=\"http:\/\/www.junit.org\/junit\/javadoc\/3.8.1\/index.htm\/allclasses-frame.html\/junit\/junit\/framework\/TestSuite.html#createTest(java.lang.Class,%20java.lang.String)\" title=\"What?  WHAT!? What did the intrepid adventurers type, damnit??\">Javadoc description for <code>TestSuite.createTest()<\/code><\/a>. Umm, guys, the <em>traditional<\/em> we-don&#8217;t-give-a-rat&#8217;s-ass-about-our-Javadoc Javadoc would have been something like, &#8220;<code>TestSuite.createTest()<\/code>: Creates a test.&#8221; Better to be random and pointless than simply pointless, I suppose.<\/p>\n<p>Second, a special shout-out to <a href=\"http:\/\/www.dell.com\/\" title=\"Who says they're low-margin?\">Dell<\/a> for designing their hardware such that you can&#8217;t buy 3rd-party memory.  Let&#8217;s see, <a href=\"http:\/\/accessories.us.dell.com\/sna\/productdetail.aspx?TabPage=techspecs&amp;sku=802391-1&amp;c=us&amp;l=en&amp;cs=04&amp;page=external\" title=\"Cost effective!  Easy to install!\">$210 for two sticks of PC100 RAM<\/a>.<sup>[<a href=\"#21-1\">1<\/a>]<\/sup>  At least now my system can handle amazing feats of computational wizardry&#8230; such as running Netscape and FrameMaker at the same time.<\/p>\n<p>But the real winner of this week&#8217;s sweepstakes is the <code>&lt;object&gt;<\/code> tag. The problems with this tag are well-known.  Yes, it has <a href=\"http:\/\/diveintomark.org\/archives\/2003\/04\/13\/object_and_internet_explorer\" title=\"Poorly supported in IE6\">terrible support in modern browsers<\/a>.  Yes, it is the <a href=\"http:\/\/www.zeldman.com\/daily\/0303a.shtml#ap1503\" title=\"But object is, like, more *semantic* and stuff!\">only replacement for the <code>&lt;img&gt;<\/code> tag in <acronym title=\"eXtensible HyperText Markup Language, Part Deux\">XHTML2<\/acronym><\/a>&#8230; <a href=\"http:\/\/www.w3.org\/TR\/2003\/WD-xhtml2-20030506\/mod-object.html#s_objectmodule\" title=\"XHTML2 Working Draft 6\">still<\/a>.  And no, <a href=\"http:\/\/www.arstechnica.com\/archive\/news\/1054749032.html\" title=\"IE is now tied to Longhorn\">the situation is not going to improve significantly<\/a> until about the <a href=\"http:\/\/www.microsoft-watch.com\/article2\/0,4248,1332766,00.asp\" title=\"Longhorn release date.  Do I hear 2007?\">year 2006<\/a>. But you&#8217;ve heard about all that.  I&#8217;d like to share with you <em>my<\/em> particular episode of <code>&lt;object&gt;<\/code> tag pain.<\/p>\n<p>The trouble started when I decided to play around with <acronym title=\"Scalable Vector Graphics\"><a href=\"http:\/\/www.w3.org\/Graphics\/SVG\/\" title=\"Scalable Vector Graphics\">SVG<\/a><\/acronym>. I dutifully downloaded the <a href=\"http:\/\/www.adobe.com\/svg\/viewer\/install\/main.html\" title=\"Get the plugin!  Unless you have a OS X box.\">Adobe SVG plugin<\/a>, and soon I was off to the races.<\/p>\n<p>So how do you embed SVG in a web page? In theory, you could do it inline&#8230; if you served up a pure XHTML page with the right MIME-type, and a carefully constructed DOCTYPE, to the right browser, on every third Sabbath after Simchat Torah.  But even the <a href=\"http:\/\/golem.ph.utexas.edu\/~distler\/blog\/archives\/000207.html\" title=\"The most technologically advanced website, ever.\">foolhardy<\/a> don&#8217;t bother with this strategy.  No, the accepted method uses the <code>&lt;object&gt;<\/code> tag, <a href=\"http:\/\/golem.ph.utexas.edu\/~distler\/blog\/archives\/000216.html\" title=\"'Secrets of SVG'\">like so<\/a>:<\/p>\n<pre>\n&lt;object type=\"image\/svg+xml\" data=\"\/path\/to\/image.svg\"\n    width=\"400\" height=\"400\"&gt;\n  &lt;img src=\"\/path\/to\/image.gif\" width= \"400\" height=\"400\" \n    alt=\"description\" \/&gt;\n&lt;\/object&gt;\n<\/pre>\n<p>The <code>&lt;object&gt;<\/code> tage embeds the SVG image, while the old-fashioned <code>&lt;img&gt;<\/code> tag provides a fallback <acronym title=\"Graphics Interchange Format\">GIF<\/acronym> image for older browsers. Elegant, right?  Only problem is that this markup crashes my copy of <a href=\"http:\/\/www.apple.com\/safari\/\" title=\"Apple's default browser\">Safari<\/a> every single time.<\/p>\n<p>The problem is with the <code>type<\/code> attribute, which specifies the MIME-type of the SVG file.  If the attribute is present, Safari crashes.  If you delete it, Safari works just fine, but IE 5.2 for Mac no longer displays the object.  Apparently IE5.2 needs the MIME-type explicitly defined. (This might also be the case for IE\/Win, but I haven&#8217;t tested this yet.)  Note that both browsers have interesting and quirky behavior.  Safari is perfectly happy to display the SVG image if there is no <code>type<\/code> attribute at all or a totally made-up value (such as &#8220;<code>foo\/bar<\/code>&#8220;.  However, a <em>wrong<\/em> MIME-type (&#8220;<code>text\/html<\/code>&#8220;) causes Safari to A) not display the image and B) bring a Finder window to the foreground. (?!)  IE5.2, on the other hand, refuses to display the object if the attribute is absent or if the MIME-type is totally made up&#8230; but it <em>does<\/em> display the image if you provide any MIME-type that it understands, such as <code>text\/html<\/code>. Meanwhile, Mozilla displays the image in all circumstances.<\/p>\n<p>But don&#8217;t fret!  You know what works for all three browsers, every single time, with no crashing or quirks whatsoever?<\/p>\n<pre>\n&lt;embed src=\"\/path\/to\/image.svg\" width=\"400\" height=\"400\"&gt;\n<\/pre>\n<p>Yeah, I need a drink too.<\/p>\n<p><small><a name=\"21-1\"><\/a>1. Seriously, who do these Dell guys think they are? Apple?<\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So how do you embed SVG in a web page? In theory, you could do it inline&#8230; if you served up a pure XHTML page with the right MIME-type, and a carefully constructed DOCTYPE, to the right browser, on every third Sabbath after Simchat Torah.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-214","post","type-post","status-publish","format-standard","hentry","category-web"],"_links":{"self":[{"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/posts\/214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/comments?post=214"}],"version-history":[{"count":0,"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/posts\/214\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/media?parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/categories?post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.goer.org\/Journal\/wp-json\/wp\/v2\/tags?post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}