<?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>Endikos &#187; Web Standards</title>
	<atom:link href="http://www.endikos.com/category/web-standards/feed" rel="self" type="application/rss+xml" />
	<link>http://www.endikos.com</link>
	<description>Journeying through the art and science of digital media.</description>
	<lastBuildDate>Sun, 11 Jul 2010 23:53:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Designing for email, and feeling dirty because of it.</title>
		<link>http://www.endikos.com/cogitatio/designing-for-email-and-feeling-dirty-because-of-it.html</link>
		<comments>http://www.endikos.com/cogitatio/designing-for-email-and-feeling-dirty-because-of-it.html#comments</comments>
		<pubDate>Mon, 23 Feb 2009 17:17:51 +0000</pubDate>
		<dc:creator>Endikos</dc:creator>
				<category><![CDATA[Cogitatio]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.endikos.com/?p=87</guid>
		<description><![CDATA[[Note: This post has been moved to ThreeBit Media, my consulting website.]
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 [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Note: This post has been moved to ThreeBit Media, my consulting website.]</em></p>
<p>Back in my first <a href="http://www.endikos.com/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 rel="external" href="http://www.justincaryphotography.com">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 rel="external" href="http://www.email-standards.org/">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.endikos.com/cogitatio/designing-for-email-and-feeling-dirty-because-of-it.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designing for Email</title>
		<link>http://www.endikos.com/cogitatio/designing-for-email.html</link>
		<comments>http://www.endikos.com/cogitatio/designing-for-email.html#comments</comments>
		<pubDate>Tue, 09 Dec 2008 19:36:58 +0000</pubDate>
		<dc:creator>Endikos</dc:creator>
				<category><![CDATA[Cogitatio]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.endikos.com/?p=80</guid>
		<description><![CDATA[How do you design for an email newsletter?  What's the box you have to design in?  What's the difference between a browser and an email client?]]></description>
			<content:encoded><![CDATA[<p><em>[Note: This post has been moved to ThreeBit Media, my consulting website.]</em></p>
<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.endikos.com/cogitatio/designing-for-email.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linking to Internal Directories</title>
		<link>http://www.endikos.com/web-standards/linking-to-internal-directories.html</link>
		<comments>http://www.endikos.com/web-standards/linking-to-internal-directories.html#comments</comments>
		<pubDate>Sat, 15 Nov 2008 20:48:56 +0000</pubDate>
		<dc:creator>Endikos</dc:creator>
				<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://www.endikos.com/?p=12</guid>
		<description><![CDATA[Using a trailing slash when linking to directories is more than just the correct thing to do, it's helpful to search engines and web servers too.]]></description>
			<content:encoded><![CDATA[<p><em>[Note: This post has been moved to ThreeBit Media, my consulting website.]</em></p>
<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 rel="external" href="http://www.alistapart.com/articles/slashforward/">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-12"></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 rel="external" href="http://www.sheldoncomics.com/">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.endikos.com/web-standards/linking-to-internal-directories.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Link Targets, Web Standards, and jQuery</title>
		<link>http://www.endikos.com/web-standards/link-targets-web-standards-and-jquery.html</link>
		<comments>http://www.endikos.com/web-standards/link-targets-web-standards-and-jquery.html#comments</comments>
		<pubDate>Fri, 14 Nov 2008 20:12:51 +0000</pubDate>
		<dc:creator>Endikos</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.endikos.com/?p=10</guid>
		<description><![CDATA[[Note: This post has been moved to ThreeBit Media, my consulting website.]
As you may or may not be aware, XHTML 1.0 Strict does not include the old &#8220;target&#8221; attribute of a link.  In other words, you can no longer code thusly in order to tell the client browser that you&#8217;d like the clicked link to [...]]]></description>
			<content:encoded><![CDATA[<p><em>[Note: This post has been moved to ThreeBit Media, my consulting website.]</em></p>
<p>As you may or may not be aware, XHTML 1.0 Strict does not include the old &#8220;target&#8221; attribute of a link.  In other words, you can no longer code thusly in order to tell the client browser that you&#8217;d like the clicked link to open in a new window:</p>
<pre class="code">&lt;a href="http://some.domain"
           target="_blank"&gt;Clicky!&lt;/a&gt;</pre>
<p>So what does one do if you still want to open a link in a new window while still maintaining the integrity of your XHTML document? There have been many proposed solutions to this, but they basically devolve to two basic theories: 1) <a rel="external" href="http://www.sitepoint.com/article/standards-compliant-world/">Use javascript to make it work</a>; and 2) <a rel="external" href="http://www.accessify.com/features/tutorials/new-windows/">Extend the DTD to reinclude the old target attribute</a>.  I tend to agree more with using javascript to make it work.  Please don&#8217;t misunderstand.  In an ideal world, extending the DTD would be awesome.  Afterall, extensibility is part and partial to the whole XHTML idea.  But in practice, I fear this would introduce too many interoperability issues between browsers.</p>
<p><span id="more-10"></span></p>
<p>So in order to open links in new windows you mark the tag as an &#8220;external&#8221; link using the rel tag, like this:</p>
<pre class="code">&lt;a href="some.domain" rel="external"&gt;Clicky!&lt;/a&gt;</pre>
<p>Most articles I&#8217;ve read have been similar to the SitePoint article I linked to earlier, in that they use javascript like this to make any link tag with a rel attribute of &#8220;external&#8221; open in a new window:</p>
<pre class="code">&lt;script type="text/javascript"&gt;
  function externalLinks() {
    if (!document.getElementsByTagName) return;
    var anchors = document.getElementsByTagName("a");
    for (var i=0; i&lt;anchors.length; i++) {
      var anchor = anchors[i];
      if (anchor.getAttribute("href") &amp;&amp;
        anchor.getAttribute("rel") == "external")
          anchor.target = "_blank";
    }
}
window.onload = externalLinks;
&lt;/script&gt;</pre>
<p>Enter jQuery. I&#8217;ve recently grown quite fond of this javascript framework.  It&#8217;s elegant and powerful.  While the above code is simple and straightforward,  I&#8217;m already using jQuery, so why not just let it do the heavy lifting?  We code it this way:</p>
<pre class="code">&lt;script type="text/javascript"&gt;
  $(function(){
    $("a[rel='external']").attr("target", "_blank");
    //update! '@' attribute syntax was deprecated
    //in jquery 1.2.  now just need the attribute
    //by itself.
  });
&lt;/script&gt;</pre>
<p>And in this manner, bliss is attained :-)  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.endikos.com/web-standards/link-targets-web-standards-and-jquery.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
