<?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>ThreeBit Media</title>
	<atom:link href="http://www.threebit.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.threebit.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 15:36:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>jQuery Link Target Automation</title>
		<link>http://www.threebit.com/blog/web-standards/jquery-link-target-automation.html</link>
		<comments>http://www.threebit.com/blog/web-standards/jquery-link-target-automation.html#comments</comments>
		<pubDate>Mon, 26 Jul 2010 15:35:43 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=78</guid>
		<description><![CDATA[In a post I wrote back in November 2008, I taught you how jQuery can be used to make links open in a new window in a standards compliant way, using the &#8220;rel&#8221; attribute in your link tag.  In my efforts to build and run a photography news website recently, it quickly became clear that [...]]]></description>
			<content:encoded><![CDATA[<p>In a post I wrote back in November 2008, I taught you how j<a href="http://www.threebit.com/blog/web-standards/link-targets-web-standards-and-jquery.html">Query can be used to make links open in a new window in a standards compliant way</a>, using the &#8220;rel&#8221; attribute in your link tag.  In my efforts to build and run a <a rel="external" href="http://www.phototimes.net">photography news website</a><!-- Isn't it ironic?  I'm giving an example of how to automate the external process, but am doing the older, manual way here in that very post!  It's deliberate, I assure you, to see who would notice. --> recently, it quickly became clear that I didn&#8217;t want to mark all my external links with &#8220;rel=external&#8221; , because every single post has an external link. Being thusly motivated, I started looking for wordpress plugins that would scan the link, determine if it was external, and do something to it in a standards compliant way that would make it open in a new window.  Coming up with diddly-squat on the search, I realized I was being dense. Again. I could let jQuery do that for me, and not have to install a plugin to do it.  Here&#8217;s the relevant code:</p>
<pre class="js" name="code">&lt;script type="text/javascript"&gt;
  $(function() {
    $("a:not([href^='http://www.phototimes.net'])").attr("target", "_blank").addClass("external-link");
  });
&lt;/script&gt;</pre>
<p>This little snippet does several things all at once. The first thing it does is find all links whose href  attribute does not begin with http://www.phototimes.net.  This selects links that are off-domain, which we want to open in a new window.  The next part sets the target attribute of the link to _blank, so that it will open in a new window, and the third part adds the external-link class to the tag.  The external-link class allows us to style the link differently that other links on the site, like adding one of those nifty little arrows that visually indicate that the link is offsite, and was popularized by Wikipedia.  jQuery, I think I love you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/web-standards/jquery-link-target-automation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Artist Spotlight: Justin Cary</title>
		<link>http://www.threebit.com/blog/artist-spotlight/justin-cary-photography.html</link>
		<comments>http://www.threebit.com/blog/artist-spotlight/justin-cary-photography.html#comments</comments>
		<pubDate>Wed, 09 Dec 2009 20:31:49 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[Artist Spotlight]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=74</guid>
		<description><![CDATA[Occasionally I come across people with amazing talent and skill in various disciplines &#8211; artistic and otherwise. Today I decided to begin writing a bit about these folks so that others can benefit from their expertise. I&#8217;ll begin by introducing you to Justin Cary, a photographer in Wichita, KS.  Justin is one of those enviable [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally I come across people with amazing talent and skill in various disciplines &#8211; artistic and otherwise.  Today I decided to begin writing a bit about these folks so that others can benefit from their expertise.  I&#8217;ll begin by introducing you to <a rel="external" href="http://www.justincaryphotography.com">Justin Cary, a photographer in Wichita, KS</a>.  Justin is one of those enviable people that has a natural and exceptional sense for the aesthetic.  He&#8217;s also got the drive and desire to learn the fundamental science that underpins his craft, so he&#8217;s developed the same sort of relationship with his cameras that a concert pianist does with his or her instrument.  So for those of you looking for excellence in wedding photography, portraiture, and even commercial photography; be sure to give Justin serious consideration.</p>
<p>Oh, and for those within driving distance, Justin tells me he&#8217;s going to be starting to offer <a rel="external" href="http://www.justincaryphotography.com/blog/photography/just-a-glance-of-an-upcoming-project.html">photography classes in Wichita</a>, so those with the desire can begin to learn photography from someone that&#8217;s actually in the industry and taking awesome photos every day.   Be sure to take an in-depth look at his portfolio pages while you&#8217;re at his site!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/artist-spotlight/justin-cary-photography.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache + Compression = Faster Website</title>
		<link>http://www.threebit.com/blog/cogitatio/apache-compression-faster-website.html</link>
		<comments>http://www.threebit.com/blog/cogitatio/apache-compression-faster-website.html#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:06:23 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[Cogitatio]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=48</guid>
		<description><![CDATA[A lot of web developers tend to overlook or ignore the  file sizes of the files that compose their websites.  I&#8217;ve seen many websites that are well over a megabyte for just the home page with all its components.  I&#8217;ve even seen a few that were over 3 megabytes.  While most americans have broadband of [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of web developers tend to overlook or ignore the  file sizes of the files that compose their websites.  I&#8217;ve seen many websites that are well over a megabyte for just the home page with all its components.  I&#8217;ve even seen a few that were over 3 megabytes.  While most americans have broadband of some fashion, there are still a significant portion (~20%) that do not have broadband, and even those that do will get impatient waiting for a page to load, and may click off before you have a chance to wow them with your content.</p>
<p>I tend to use several techniques to keep my overall document size reasonable:</p>
<ol>
<li>Compressed Images &#8211; JPEG (for complex images) between 40 and 65 percent quality, depending on where compression artifacts become too noticeable; GIF (for simple images) color palette restrictions between 8 and 128 colors, depending on where the artifacts become too noticeable. Of course I also use PNG images where a really good alpha channel is needed, but I use them sparingly, as full alpha transparencies dont compress well.</li>
<li>Minified Javascript and CSS files.  I like the <a href="http://developer.yahoo.com/yui/compressor/" rel="external">YUI Compressor</a> for this.</li>
<li>Server-side compression.   Even minified files can be squeezed even smaller with the use of server-side compression.</li>
</ol>
<p>Server-side compression is super-simple to implement, as long as you have access to an .htaccess file or a friendly server administrator.  Here&#8217;s a syntax that works for me on a couple of servers I run (This is Apache specific, for other servers find a mod_deflate equivalent):</p>
<pre name="code" class="ruby">AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
AddOutputFilterByType DEFLATE text/x-js application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html</pre>
<p>The two AddOutputFilterByType lines can be combined into one or split up however you choose if you&#8217;re a stickler for keeping your text in configuration files readable. This can be inserted in the virtualhost definition or in your .htaccess file.  Using this alone, I consistently shave off between 60 and 100 kilobytes off my download size.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/cogitatio/apache-compression-faster-website.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Download My Grid Template</title>
		<link>http://www.threebit.com/blog/web-design/download-my-grid-template.html</link>
		<comments>http://www.threebit.com/blog/web-design/download-my-grid-template.html#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:57:52 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=41</guid>
		<description><![CDATA[One of the things I often use when building a website is a grid template. This is basically just a set of guides and an overlay I use in photoshop when mocking things up. I&#8217;ve come to learn that sites that are built against a grid have a structure that is felt more than seen. [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I often use when building a website is a grid template.  This is basically just a set of guides and an overlay I use in photoshop when mocking things up.  I&#8217;ve come to learn that sites that are built against a grid have a structure that is felt more than seen. They make a visitor feel like things are just well put together, and comfortable to use.  This certainly doesn&#8217;t mean you can&#8217;t get really creative, and it doesn&#8217;t impose any sort of limitations on what you can do, in fact I think that they make life a bit easier.  </p>
<p>My favorite template currently is a 12 column, 900 pixel wide layout.  You of course don&#8217;t have to use 12 tiny columns, but it gives you the flexibility to split those columns into various configurations, like three 300px columns; one 600px column and one 300px column; one 375px column, one 225px column, and two 150px columns; a page broken into three vertical sections, each having a different column configuration&#8230; whatever! This one has 6px gutters and guides for the edges and middle of the gutter, depending on how you want to line things up.</p>
<p>Se here you go, my <a href='http://www.threebit.com/blog/wp-content/uploads/2009/10/900px_12column.psd'>900px 12-column Photoshop Grid Template</a>.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/web-design/download-my-grid-template.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>And now, for something completely different&#8230;</title>
		<link>http://www.threebit.com/blog/cogitatio/it-only-took-five-years.html</link>
		<comments>http://www.threebit.com/blog/cogitatio/it-only-took-five-years.html#comments</comments>
		<pubDate>Thu, 08 Oct 2009 04:06:26 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[Cogitatio]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=1</guid>
		<description><![CDATA[So rather like the proverbial mechanic&#8217;s car, the web developer&#8217;s own website can languish unless he or she makes it a priority.  So after 5 1/2 years, I&#8217;m finally releasing a website under the ThreeBit flag.  I&#8217;m going to be transplanting some articles from my personal blog here to sort of get things off the [...]]]></description>
			<content:encoded><![CDATA[<p>So rather like the proverbial mechanic&#8217;s car, the web developer&#8217;s own website can languish unless he or she makes it a priority.  So after 5 1/2 years, I&#8217;m finally releasing a website under the ThreeBit flag.  I&#8217;m going to be transplanting some articles from my personal blog here to sort of get things off the ground, and will go from there.  So welcome to the new ThreeBit Media website!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/cogitatio/it-only-took-five-years.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designing for email, and feeling dirty because of it.</title>
		<link>http://www.threebit.com/blog/cogitatio/designing-for-email-and-feeling-dirty-because-of-it.html</link>
		<comments>http://www.threebit.com/blog/cogitatio/designing-for-email-and-feeling-dirty-because-of-it.html#comments</comments>
		<pubDate>Mon, 23 Feb 2009 18:17:50 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[Cogitatio]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=28</guid>
		<description><![CDATA[Back in my first Designing For Email post, I discussed workable dimensions and some common-sense techniques when you&#8217;re approaching designing for email. Most of that still holds true, but I&#8217;ve discovered an unpleasant lack of support in a few email clients for an important bit of CSS: floating, clearing, and margins. The lack of this [...]]]></description>
			<content:encoded><![CDATA[<p>Back in my first <a href="http://www.threebit.com/blog/cogitatio/designing-for-email.html">Designing For Email</a> post, I discussed workable dimensions and some common-sense techniques when you&#8217;re approaching designing for email.  Most of that still holds true, but I&#8217;ve discovered an unpleasant lack of support in a few email clients for an important bit of CSS: floating, clearing, and margins.  The lack of this one bit makes good design wholly in CSS nearly impossible.  I&#8217;m officially peeved.  What&#8217;s really weird is MS Outlook.  Outlook 2003 supports floating just fine.  Outlook 2007 does not.  So what does this leave me with?  Table-based design.</p>
<p>Yeah, I know. Seriously.  After all this time when CSS has (finally!) become a standard method of layout.  When people are finally getting the whole point of separation of concerns when it comes to content versus layout, and browsers are getting good support, and for the most part I can get my designs to be pretty consistent across browsers without much effort as long as I closely follow the rules&#8230;  I&#8217;m having to retrofit my CSS-based layout into a table-based design.</p>
<p>As I was coming to grips with this I did a sanity check by looking through the last few months of my inbox and looking at the adverts (non-spam) I&#8217;d recieved.  A quick look at the source confirmed that they were ALL table-based.  Dang.  And now the <a href="http://www.justincaryphotography.com" rel="external">fellow across the hall</a> is making fun of me.  He knows how dirty I feel for having to violate standards to make something layout correctly.   Oh well.  For what it&#8217;s worth, I did stumble across the <a href="http://www.email-standards.org/" rel="external">Email Standards Project</a>, which is what confirmed that Outlook 2007 and Gmail (!) both lack support for floating/clearing.  So, have fun dusting off the table-based design knowledge you&#8217;d accumulated and then happily buried when CSS finally became a viable alternative.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/cogitatio/designing-for-email-and-feeling-dirty-because-of-it.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sitemaps and Multilingual Websites</title>
		<link>http://www.threebit.com/blog/seo/sitemaps-and-multilingual-websites.html</link>
		<comments>http://www.threebit.com/blog/seo/sitemaps-and-multilingual-websites.html#comments</comments>
		<pubDate>Wed, 07 Jan 2009 04:17:43 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=11</guid>
		<description><![CDATA[When beginning the architecting of the site I&#8217;ve been working on I knew I would need to address two issues (among many others, but for now we&#8217;ll just cover these two): 1) How to structure a multilingual website physically, and 2) How to address the sitemap.xml structure for the site as a whole. First I [...]]]></description>
			<content:encoded><![CDATA[<p>When beginning the architecting of the site I&#8217;ve been working on I knew I would need to address two issues (among many others, but for now we&#8217;ll just cover these two): 1) How to structure a multilingual website physically, and 2) How to address the sitemap.xml structure for the site as a whole.</p>
<p>First I had to decide how the site should be physically structured.  Would a subdomain-per-language be good, e.g, en.mysite.com for English, es.mysite.com for Spanish, and ru.mysite.com for Russian?  Or would it be better to use directories for the distinction, e.g. www.mysite.com/en/ for English, etc?  If I chose the subdomain route it would be easy to build sitemap.xml files for each domain.  But how would I structure the sitemap.xml if using directories?</p>
<p>I chose to use directories for a couple of reasons.  One, I knew that google treats subdomains as entirely separate websites.  I didn&#8217;t wish to do this because semantically these were three translations of the same website, and I felt that should be reflected in their structure.  Two, I didn&#8217;t want to have multiple datasets when dealing with analytics, either multple log files to analyze or one of the myriad javascript-based analytics packages.  Yes, I&#8217;m fully aware that there are ways to glom datasets together, or otherwise make analytics packages aware of your structure&#8230; this was just pure personal preference.</p>
<p>OK, so now I have my structure in place, how do I build the sitemap.xml?  I don&#8217;t want one huge monolithic file for the entire site.  Even though at current count there are only around 100 html files per translation (not huge by any means, but also not insignificant), I would just personally prefer to keep the translations in their own separate sitemap.xml files.  Those of you familiar with sitemaps will have been shouting at your monitors by now &#8220;Use a sitemap index, dork!&#8221;, and you&#8217;d be right.  I just wasn&#8217;t sure that Google would support this.  Google didn&#8217;t seem to mention it anywhere in their webmaster tools documentation (though I could have just missed it).</p>
<p>I&#8217;m happy to report that Google does in fact support sitemap indexes, and I&#8217;m fairly certain that MSN and Yahoo! do as well. So, simply build yourself a sitemap_index.xml (the filename is arbitrary) file that looks like this:</p>
<pre  name="code" class="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
     &lt;sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt;
     &lt;sitemap&gt;
          &lt;loc&gt;http://www.mysite.com/sitemap_en.xml&lt;/loc&gt;
     &lt;/sitemap&gt;
     &lt;sitemap&gt;
          &lt;loc&gt;http://www.mysite.com/sitemap_es.xml&lt;/loc&gt;
     &lt;/sitemap&gt;
     &lt;sitemap&gt;
          &lt;loc&gt;http://www.mysite.com/sitemap_ru.xml&lt;/loc&gt;
     &lt;/sitemap&gt;
&lt;/sitemapindex&gt;</pre>
<p>Then build your individual sitemap files as you normally would.  You can find the full specifications for sitemaps at <a rel="external" href="http://sitemaps.org/">sitemaps.org</a>, and a nifty utility to help you automatically build sitemap files at the <a rel="external" href="http://sourceforge.net/projects/goog-sitemapgen/">google-sitemap_gen</a> project.  Dont forget to <a rel="external" href="http://www.sitemaps.org/protocol.php#informing">include your new sitemap index file in your robots.txt file</a>!  Enjoy.</p>
<p>UPDATED: December 8, 2009 &#8211; Corrected my syntax on the xml. D&#8217;oh!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/seo/sitemaps-and-multilingual-websites.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Designing for Email</title>
		<link>http://www.threebit.com/blog/cogitatio/designing-for-email.html</link>
		<comments>http://www.threebit.com/blog/cogitatio/designing-for-email.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 20:36:18 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[Cogitatio]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=22</guid>
		<description><![CDATA[My company is about to launch an email newsletter and I began to wonder about what layout dimensions I should shoot for. I&#8217;ve not given it a lot of thought in the past, but as I&#8217;m building a template for repeated reuse, I&#8217;m now giving it a few neuron cycles. There are a couple of [...]]]></description>
			<content:encoded><![CDATA[<p>My company is about to launch an email newsletter and I began to wonder about what layout dimensions I should shoot for.  I&#8217;ve not given it a lot of thought in the past, but as I&#8217;m building a template for repeated reuse, I&#8217;m now giving it a few neuron cycles. There are a couple of major issues with designing for email that are reminiscent of the especially difficult browser-compatibility problems that have caused multitudes of web designers to rage and wail and burble incoherently.  These issues are essentially this: 1) email clients don&#8217;t give you a lot of room to work in; and 2) email clients are not full-featured browsers.</p>
<p>Let&#8217;s talk about physical dimensions first. An email client is designed and navigated differently from a browser.  The &#8220;chrome&#8221; on most modern email clients include not only the toolbars and menus, but an entire left-hand column used to navigate mail boxes and other features.  This column alone consumes a couple hundred pixels of horizontal real estate.  Vertically, the space is usually split in half so that the user can see a list of messages in the upper half and then view them in the lower.  When all this is taken into account while still designing for a small common screen resolution on the order of 1024&#215;768, you wind up with a usable viewport more in the neighborhood of 650&#215;300.</p>
<p>Now take into consideration that the (X)HTML rendering capabilities of email clients are not necessarily on par with fully-featured browsers.  For security and speed, most email clients have a very limited set of supported browser features.   Most won&#8217;t display flash, few support animated gifs, and JavaScript support is typically limited.  Thanks to spam, you&#8217;re not even guaranteed any images will display at all, but fortunately, most of the time plain-jane images will load just fine.</p>
<p>So here are a few guidelines for (X)HTML-formatted documents delivered via email:</p>
<ol>
<li>Keep your overall width between 600 and 650 px.  This should be old-hat to those of us that were designing around the turn of the century, and will be an interesting excercise to the neophytes.</li>
<li>Remember that the &#8220;fold&#8221; on an email client is likely going to be around 250-300 pixels down the page, so make sure you have something above the fold that will make your user want to scroll.</li>
<li>Keep it simple.  Avoid JavaScript.  Use well-supported (X)HTML and (inline or on-page) CSS only to aid your presentation.</li>
<li>Keep it standards compliant.  The same &#8220;failing gracefully&#8221; principals apply to email that apply to browsers.  However, there&#8217;s the additional &#8220;standard&#8221; of making sure you have a text-only version of your email ready to fly along with the HTML-formatted version.</li>
</ol>
<p>Finally, a note about content.  A rule that used to apply to physical newsletters is also applicable to email newsletters.  A friend of mine used to tell me that &#8220;A good newsletter can be read between the mailbox and the trashcan&#8221;.  Be brief in your email content and link frequently to expanded content on your website.  Enjoy!</p>
<p>UPDATE!  I&#8217;ve discovered that Outlook 2007 and Google&#8217;s Gmail don&#8217;t support floating and clearing.  This makes design using pure XHTML and CSS very painful.  I&#8217;ve got new post about this issue and my dismay <a href="http://www.endikos.com/cogitatio/designing-for-email-and-feeling-dirty-because-of-it.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/cogitatio/designing-for-email.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Negative Z-Index Values in Firefox 2</title>
		<link>http://www.threebit.com/blog/css/negative-z-index-values-in-firefox-2.html</link>
		<comments>http://www.threebit.com/blog/css/negative-z-index-values-in-firefox-2.html#comments</comments>
		<pubDate>Fri, 21 Nov 2008 04:24:51 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=20</guid>
		<description><![CDATA[I discovered recently that Firefox 2 can&#8217;t handle negative CSS z-index values. Apparently it throws any element with a negative z-index applied to it beneath the body. I discovered this after I had already positioned elements on a page and found some improperly indexed elements on testing IE. So instead of reworking all my existing [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered recently that Firefox 2 can&#8217;t handle negative CSS z-index values.  Apparently it throws any element with a negative z-index applied to it beneath the body.  I discovered this after I had already positioned elements on a page and found some improperly indexed elements on testing IE.  So instead of reworking all my existing z-index values, I just gave the offending element a negative value.  This worked in Firefox 3, IE7, Safari, and even IE6.  I thought all was golden until a co-worker&#8217;s brother called and said &#8220;Do you know your site doesn&#8217;t work in Firefox 2?&#8221;.</p>
<p>Frankly, it never even occurred to me to check different versions of Firefox.  I know this seems obvious, but Firefox had always been so consistent for me, I hadn&#8217;t thought about checking multiple versions.  So I loaded up FF2 on my Windows VM (I normally run a Mac with windows installed in a Virtual Machine to do cross-browser testing and other windows-specific things), and sure enough, we have a whole lot of nastiness. Dang. So now I rework all my z-index values like I should have in the first place, and all is good again.</p>
<p>This has been a public service announcement. Carry on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/css/negative-z-index-values-in-firefox-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linking to Internal Directories</title>
		<link>http://www.threebit.com/blog/seo/linking-to-internal-directories.html</link>
		<comments>http://www.threebit.com/blog/seo/linking-to-internal-directories.html#comments</comments>
		<pubDate>Sat, 15 Nov 2008 21:48:28 +0000</pubDate>
		<dc:creator>Bill Knechtel</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.threebit.com/blog/?p=18</guid>
		<description><![CDATA[I could just say &#8220;Use trailing slashes!&#8221; and be done with it. But that would leave you, dear reader, underwhelmed and grumbly. You may have already read this article on A List Apart regarding using trailing slashes. In that article the author mentions three reasons for using trailing slashes when linking to directories (and I [...]]]></description>
			<content:encoded><![CDATA[<p>I could just say &#8220;Use trailing slashes!&#8221; and be done with it.  But that would leave you, dear reader, underwhelmed and grumbly.  You may have already read <a href="http://www.alistapart.com/articles/slashforward/" rel="external">this article</a> on A List Apart regarding using trailing slashes.  In that article the author mentions three reasons for using trailing slashes when linking to directories (and I quote):</p>
<ol>
<li>We’re doing ourselves a favor, as this is the correct way to do things.</li>
<li>﻿﻿We’re doing our server a favor, as this means less disk access.</li>
<li>And most importantly, we’re doing our visitors a favor, because they’re no longer losing a few seconds while our server tries to find first a file and then a directory. And in this industry, you and I both know that a few seconds is a long, long time.</li>
</ol>
<p>Now this article was written in 2002 when most everyone was still on dialup and servers were much slower in general. So number 3 doesn&#8217;t really apply anymore.  In this article, I&#8217;m going to give you a new reason number 3, and go into more detail on number 1, to help you understand why this is the correct way to do things.</p>
<p><span id="more-18"></span></p>
<p>Let&#8217;s first look at what happens when your browser requests a normal page.  We&#8217;ll mimic a simple browser session using telnet from the command line.</p>
<p>We first initiate the telnet session with the server:</p>
<pre class="code">Aletheia:~ wknechtel$ telnet www.sheldoncomics.com 80</pre>
<p>When we&#8217;re connected the server, it responds thus:</p>
<pre class="code">Trying 208.122.50.173...
Connected to sheldoncomics.com.
Escape character is '^]'.</pre>
<p>We then issue the commands that a browser would.  This is a little simplistic as a browser would also tell the server what sorts of encodings and content it can accept, but this will work:</p>
<pre class="code">GET / HTTP/1.1
Host: www.sheldoncomics.com</pre>
<p>The request we&#8217;ve just issued breaks down like this: GET is the request method. There are other request methods, you&#8217;re probably most familiar with GET and POST.  Then we specify the URI  we&#8217;re requesting. In this case we use a slash to indicate that we&#8217;re looking for the top-most root document the server will hand us. Then We specify the protocol of HTTP, version 1.1.</p>
<p>HTTP 1.1 introduced the concept of the virtual host, so that you could tie more than one domain to an IP address.  This brings us to the second line.  Since we&#8217;re using HTTP/1.1, we have to declare which host we&#8217;re looking for as well. Make sure you hit enter twice after this, so that the server knows you&#8217;re done entering the request. Now the server will begin to deliver your request:</p>
<pre class="code">HTTP/1.1 200 OK
Date: Sat, 15 Nov 2008 16:32:37 GMT
Server: Apache/2.2.10 (Unix)
Vary: Host
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked

1e4c

&lt;!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;html&gt;
...
&lt;/html&gt;

0

Connection closed by foreign host.</pre>
<p>We&#8217;re only really interested in the first few lines, called the header, and I&#8217;ve snipped out the vast majority of the returned HTML.  Specifically we look at that &#8220;200 OK&#8221;.  The 200 Status code tells us that everything is good-to-go: the document we&#8217;ve requested exists, we have permission to view it, and nothing went wrong internally while trying to retrieve it.  It then tells us other things like the type of transmission to expect, how large the document is, and the version of the server software.</p>
<p>Now let&#8217;s look at what happens when we request a directory without a trailing slash:</p>
<pre class="code">GET /store HTTP/1.1
Host: www.sheldoncomics.com</pre>
<p>This time the response from the server is different:</p>
<pre class="code">HTTP/1.1 302 Found
Date: Sat, 15 Nov 2008 18:40:42 GMT
Server: Apache/2.2.10 (Unix)
Location: http://www.sheldoncomics.com/store/
Content-Length: 334
Content-Type: text/html; charset=iso-8859-1
...</pre>
<p>This is what&#8217;s known as a 302 redirect.  It was originally implemented so that webmasters could change the structure of their website and redirect visitors from the old (perhaps bookmarked) page, to the new page that has the same content.  This allows you to actually change the names of your HTML files or change out whatever dynamic back-end your using and not worry about visitors getting lost during changes.</p>
<p>Now with our URI request that didn&#8217;t include a trailing slash, Apache couldn&#8217;t find what we were looking for, because it though we were requesting a file, not a directory.  So trying to be nice before issuing a status of 404 (Not Found), Apache figured it would check &#8211; just in case &#8211; to see if there&#8217;s a directory matching the requested URI.  Since there was in this case, it issued a 302 automatically to let us know the location of what we were really looking for.  This is the reason it gave us a &#8220;Location: &#8221; header entry in its response to us.</p>
<p>So why use trailing slashes when linking to directories? Because the 302 is not supposed to compensate for an incorrectly structured link.  This, thinking back to reason number 1 above, is the correct way to do it.  Also, thinking back to number 2 above, it keeps apache from doing unnecessary work.  And now for your new reason number 3: its good for the search engines.  Proper structure &#8211; everything from proper and valid (X)HTML to correctly formed links &#8211; is more easily digestible by the search engine&#8217;s spiders.  If you want good placement, you should make it as easy as possible for the engines to crawl your site.  A trailing slash may seem insignificant, but it&#8217;s easy to do and makes web servers happy :-)  Enjoy!</p>
<p>Oh, by the way, you really should check out <a href="http://www.sheldoncomics.com/" rel="external">http://www.sheldoncomics.com/</a>, a masterfully written and illustrated comic about a boy genius, his talking duck, and their adventures in life; by Dave Kellett.  I&#8217;ve been following this strip for about six years now, and abusively used his server in my examples for this article. Tell Dave I said hello when you stop by.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.threebit.com/blog/seo/linking-to-internal-directories.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
