<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>No Mod Required &#187; standards</title>
	<atom:link href="http://www.drunkenfist.com/304/category/web/standards/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.drunkenfist.com/304</link>
	<description>Rob Larsen writes on entertainment, sports and culture.</description>
	<lastBuildDate>Wed, 08 Feb 2012 02:28:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>rel=&quot;canonical?&quot; I&#039;m Down. More Importantly, So Are Yahoo! and Google</title>
		<link>http://www.drunkenfist.com/304/2009/02/13/relcanonical-im-down-more-importantly-so-are-yahoo-and-google/</link>
		<comments>http://www.drunkenfist.com/304/2009/02/13/relcanonical-im-down-more-importantly-so-are-yahoo-and-google/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:02:13 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[tips-and-tricks]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=5602</guid>
		<description><![CDATA[In the middle of moving all those underscore delineated URLs to dash delineated URLs*, Google went ahead and announced the rel="canonical" scheme for defining the preferred URL for a piece of content. While it's not the biggest deal for me, other than the "/" vs "/index.php" question, for many people with more dynamic systems it's [...]]]></description>
			<content:encoded><![CDATA[<p>In the middle of moving all those underscore delineated URLs to dash delineated URLs*, Google went ahead and announced the rel="canonical" scheme for defining the preferred URL for a piece of content. While it's not the biggest deal for me, other than the "/" vs "/index.php" question, for many people with more dynamic systems it's a <strong>big deal</strong>. Bravo to everyone involved as it's a really straightforward, easy-to-implement solution to a common, troublesome problem.<br />
<span id="more-5602"></span><br />
Google<br />
<a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html">Specify your canonical</a></p>
<blockquote><p>Carpe diem on any duplicate content worries: we now support a format that allows you to publicly specify your preferred version of a URL. If your site has identical or vastly similar content that's accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version.
</p></blockquote>
<p>Yahoo!<br />
<a href="http://ysearchblog.com/2009/02/12/fighting-duplication-adding-more-arrows-to-your-quiver/">Fighting Duplication: Adding more arrows to your quiver</a></p>
<blockquote><p>Avoiding duplicates in the search engine index has consistently been a key concern we’ve heard from webmasters and site owners. Over the last few years, we have made significant strides in finding duplicates in our crawler and index algorithmically and provided webmasters with better tools for controlling these. Today we are announcing our support for a new HTML tag, the
<link> tag, which helps reduce duplicates by documenting the preferred URL form to access each page.</p></blockquote>
<p>*yes, I'm done. Three days, a lot of careful planning and more regular expressions that I've ever written later, everything on my site is now cool like this ( <a href="http://www.drunkenfist.com/art/graffiti-art/black-book/index.php">http://www.drunkenfist.com/art/graffiti-art/black-book/index.php</a> ) Dash heaven.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2009/02/13/relcanonical-im-down-more-importantly-so-are-yahoo-and-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Matter What the Numbers Say- IE6 Support Here Ends With IE8&#039;s Release</title>
		<link>http://www.drunkenfist.com/304/2008/11/22/no-matter-what-the-numbers-say-ie6-support-here-ends-with-ie8s-release/</link>
		<comments>http://www.drunkenfist.com/304/2008/11/22/no-matter-what-the-numbers-say-ie6-support-here-ends-with-ie8s-release/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 14:07:26 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[browsers]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=5111</guid>
		<description><![CDATA[Right now Internet Explorer 6 averages about 10-12% of my traffic here (11% for the past month.) While I won't dismantle existing support mechanisms, I will no longer test new features in IE6 and going forward I will not support or test for IE6 for the new version of the site. The good news is, [...]]]></description>
			<content:encoded><![CDATA[<p>Right now Internet Explorer 6 averages about 10-12% of my traffic here (11% for the past month.) While I won't dismantle existing support mechanisms, I will no longer test new features in IE6 and going forward I will not support or test for IE6 for the new version of the site.</p>
<p>The good news is, I rarely do anything here that will tax IE6 heavily and the redesign will likely be architected in such a way that it will probably work <em>pretty well</em> in IE6 even without specific attention.  The bad news is, 11% equals about 6000 people and the thought of annoying, <em>even slightly</em>, that many folks over a month worries me. The thing is, I just can't support three versions of a browser, especially when one of them is such an odd man out. IE7/IE8 are comfortably supportable browsers. IE6 plainly sucks. </p>
<p>Spurred on by this:</p>
<p><a href="http://www.download.com/8301-2007_4-10103871-12.html">Microsoft: IE 8 won't be done until 2009</a></p>
<p>So I've got to draw a line in the sand.</p>
<p>Now if I can just convince them to do the same at work&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2008/11/22/no-matter-what-the-numbers-say-ie6-support-here-ends-with-ie8s-release/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My New GetElementsByClass() + a Safari 3.1 Oddity</title>
		<link>http://www.drunkenfist.com/304/2008/07/16/my-new-getelementsbyclass-a-safari-31-oddity/</link>
		<comments>http://www.drunkenfist.com/304/2008/07/16/my-new-getelementsbyclass-a-safari-31-oddity/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 03:39:20 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=4672</guid>
		<description><![CDATA[To make use of the native getElementsByClassName I rewrote my getElementsByClass function to use the method where possible. Here's the code*: function getElementsByClass(theClass,node) { var classElements = []; var i; if ( node == null ) { node = document } if (node.getElementsByClassName) { var tempCollection = node.getElementsByClassName(theClass); for (i = 0; i &#60; tempCollection.length [...]]]></description>
			<content:encoded><![CDATA[<p>To make use of the native <a href="http://www.drunkenfist.com/304/2008/07/02/say-hello-to-javascripts-native-getelementsbyclassname/">getElementsByClassName</a> I rewrote my getElementsByClass function to use the  method where possible. </p>
<p>Here's the code*:<br />
<span id="more-4672"></span></p>
<div class="code_sample">
<pre><code>function getElementsByClass(theClass,node) {
    var classElements = [];
    var i;
    if ( node == null ) {
    	node = document
    }
    if (node.getElementsByClassName) {
    	var tempCollection = node.getElementsByClassName(theClass);
        for (i = 0; i &lt; tempCollection.length ; i++) {
    		classElements.push(tempCollection[i])
    	}
    }
    else {
    	var els = node.getElementsByTagName(&quot;*&quot;);
    	var elsLen = els.length;
    	var pattern = new RegExp(&quot;(^|\\s)&quot;+theClass+&quot;(\\s|$)&quot;);
    	for (i = 0; i &lt; elsLen; i++) {
    		if ( pattern.test(els[i].className) ) {
    			classElements.push(els[i]);
    		}
    	}
    }
    return classElements;
};</code></pre>
</div>
<p>The above code works as expected in Firefox 2, 3; IE 6,7,8, Opera 9.5 and Safari 2.</p>
<p>Interestingly it doesn't work in Safari 3.1. Safari supports the native getElementsByClassName, so one would expect it to work alongside Firefox 3 and Opera 9.5.</p>
<p>It does not.</p>
<p>Here's a sample. Click "start" and everything should go from blue to black (which means the class is removed from the LIs) and the numbers should read "10 0". The 10 is the length of the collection returned by my function when the test starts. The 0 refers to the length after the test has run it's course and the class has been removed.  </p>
<p><iframe src="http://www.drunkenfist.com/web/samples/getElementsByClass/" width="80%" height="400px" ></iframe> </p>
<p>Safari 3.1 looks like this:</p>
<p><a href='http://media.drunkenfist.com/304/wp-content/uploads/2008/07/untitled-1.png'><img src="http://media.drunkenfist.com/304/wp-content/uploads/2008/07/untitled-1-300x210.png" alt="" title="untitled-1" width="300" height="210" class="alignnone size-medium wp-image-4675" /></a></p>
<p>So the count is 10, even though there are 0 instances of the class in the DOM:</p>
<p><img src="http://media.drunkenfist.com/304/wp-content/uploads/2008/07/no-class.png" alt="" title="no-class" width="400" height="249" class="alignnone size-full wp-image-4676" /></p>
<p>This is the code I'm running:</p>
<div class="code_sample">
<pre><code>function testSafari() {
    $(&quot;messages&quot;).innerHTML = getElementsByClass(&quot;sample&quot;).length;
    var samples = getElementsByClass(&quot;sample&quot;);
    for (i=0;i&lt;samples.length;i++) {
	    removeClass(samples[i],&quot;sample&quot;);
    }
    $(&quot;messages&quot;).innerHTML += &quot;    &quot;+getElementsByClass(&quot;sample&quot;).length;
}</code></pre>
</div>
<p>I've approached the problem from a few different angles (not exhaustive) and taking a quick look at the WebKit source it seems to me that Safari might be incorrectly caching the results of the getElementsByClassName call. I haven't had the time I would like to test this to see what might be happening in specific, but that's what it feels like. </p>
<p>Anyone know more about the guts of WebKit? Am I onto something? Or is my nonexistent Apple dev knowledge showing? <img src='http://www.drunkenfist.com/304/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>For the webdev crowd, anyone else seen anything like this? Is it something stupid that I'm doing that I'm just not seeing (and therefore not actually a bug)? </p>
<p>That's always my first assumption, but the native method works in both Opera and Firefox so I'm more confident than normal that the issue isn't my fault.</p>
<p>*I used to have support for a specific tag. When rewriting it I thought "I never use the tag argument, I'm dropping it." Of course, as soon as I did that one of my co-workers used the tag argument in a script he was writing for a site we were working on. I'll be adding the tag option back in.</p>
<p>Also, this version relies on support for Array.push(). Our little library adds it in with this:</p>
<div class="code_sample">
<pre><code>
if(!Array.prototype.push) {
    function array_push() {
        for(var i=0;i&lt;arguments.length;i++){
	        this[this.length]=arguments[i]
        };
        return this.length;
    }
    Array.prototype.push = array_push;
}
</code></pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2008/07/16/my-new-getelementsbyclass-a-safari-31-oddity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Patterns That Need to Die- Yes, I&#039;m Looking Right at You IE6</title>
		<link>http://www.drunkenfist.com/304/2008/06/04/css-patterns-that-need-to-die-yes-im-looking-right-at-you-ie6/</link>
		<comments>http://www.drunkenfist.com/304/2008/06/04/css-patterns-that-need-to-die-yes-im-looking-right-at-you-ie6/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 03:54:42 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[browsers]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=4600</guid>
		<description><![CDATA[Here's it is. //height for IE6. Thankfully IE6 messes up height in a useful way height:350px; //height for everything else. IE6 looks at this and says "wha?" height:auto; //min-height for everything else. IE6 is baffled by this. min-height:350px; I can't tell you how many times I've used this exact pattern. It actually works really well, [...]]]></description>
			<content:encoded><![CDATA[<p>Here's it is. </p>
<div class="code_sample"><code>
<pre>
<em>//height for IE6. Thankfully IE6 messes up height in a useful way</em>
height:350px;
<em>//height for everything else. IE6 looks at this and says "wha?"</em>
height:auto;
<em>//min-height for everything else. IE6 is baffled by this.</em>
min-height:350px;</pre>
<p></code></div>
<p><span id="more-4600"></span><br />
I can't tell you how many times I've used this exact pattern. It actually works really well, it's just so <strong>wrong</strong> it bothers me each and every time I type it into a style sheet.  </p>
<p>It works because the first <code>height</code> declaration, in pixels, is rendered by Internet Explorer 6 exactly the way the next two rules are rendered by every other browser. Meaning, it starts at 350px and then expands to fill whatever content it contains. Add to that the fact IE6 is baffled by the next two declarations (not understanding <code>auto</code> as a value for <code>height</code> and not supporting <code>min-height</code> in any way, shape or form) and for IE6 <code>height</code> is all you need. </p>
<p>Thing is, every other browser that matters renders the single height declaration (with overflowing content) like this:</p>
<p><img src="http://media.drunkenfist.com/304/wp-content/uploads/2008/06/minheight.png" alt="min-height" title="minheight" width="200" height="342" class="alignnone size-full wp-image-4602" /></p>
<p>Which is where the <code>height:auto</code> and <code>min-height</code> declarations come into play. Add those in and things start acting as expected with the other browsers- the container starts at 350px and  expands to fit the overflowing content. </p>
<p>Since there are no "hacks", the above sheet will validate, I just hate the pattern of declaring <code>height</code> once and then immediately redeclaring it- especially to support a seven year old browser.</p>
<p>So&#8230; IE6? Are you listening? Can you please give up the ghost so I can put this pattern to bed?</p>
<p>Pretty please?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2008/06/04/css-patterns-that-need-to-die-yes-im-looking-right-at-you-ie6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Question: When is a CSS Class not a CSS Class?</title>
		<link>http://www.drunkenfist.com/304/2008/06/01/question-when-is-a-class-not-a-class/</link>
		<comments>http://www.drunkenfist.com/304/2008/06/01/question-when-is-a-class-not-a-class/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 03:09:16 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[standards]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.drunkenfist.com/304/?p=4589</guid>
		<description><![CDATA[Answer: When it's a unique identifier. Check out this class attribute generate by my beloved WordPress' upload feature: class="alignleft size-medium wp-image-4590" See anything suspicious? I sure do. wp-image-4590 is a unique identifier being passed off as a class. Why? I actually have no clue as I'm not privy to the thought process behind that particular [...]]]></description>
			<content:encoded><![CDATA[<p>Answer: When it's a unique <strong>id</strong>entifier.</p>
<p>Check out this class attribute generate by my beloved WordPress' upload feature:</p>
<p><code>class="alignleft size-medium wp-image-4590"</code></p>
<p>See anything suspicious? I sure do. <code>wp-image-4590</code> is a unique identifier being passed off as a <code>class</code>. Why? I actually have no clue as I'm not privy to the thought process behind that particular piece of code <img src='http://www.drunkenfist.com/304/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   What I do know is pretty much demands to be an <code>ID</code>. When I teach this stuff to people, I say "If it's unique, meaning there will ever only be one of them, make it an <code>ID</code>. If there's more than one or it's a general descriptor, make it a <code>class</code>." So I look at that code block every time I upload an image and I frown. Then I blow away the whole class attribute away, since I use none of them.</p>
<p>This is just splitting hairs, I know. Using a class like that is basically harmless. But, truth be told, splitting hairs helps me solidify my ideas about the way these things should work. That, in turn helps me improve the way my crew and I do our thing. So? <em>Hairs I split</em> and everyone is happier. </p>
<p>I'm just doing my small part to make the web a better place one nitpicky, semantic post at a time. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.drunkenfist.com/304/2008/06/01/question-when-is-a-class-not-a-class/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

