<?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>Design &#38; Development Blog &#124; Jared Lunde &#187; Optimization</title>
	<atom:link href="http://www.jaredlunde.com/blog/topic/website-optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jaredlunde.com/blog</link>
	<description>A logo design blog and web development blog by designer and developer Jared Lunde.</description>
	<lastBuildDate>Sat, 04 Sep 2010 02:53:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Web Design &#8211; Form &amp; Function</title>
		<link>http://www.jaredlunde.com/blog/web-design-form-follows-function/</link>
		<comments>http://www.jaredlunde.com/blog/web-design-form-follows-function/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 10:22:08 +0000</pubDate>
		<dc:creator>Jared Lunde</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Form And Function]]></category>
		<category><![CDATA[Form Follows Function]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web Designers]]></category>
		<category><![CDATA[Web Developers]]></category>

		<guid isPermaLink="false">http://www.jaredlunde.com/blog/?p=98</guid>
		<description><![CDATA[I've coded a lot of websites for a lot of different designers and a common problem I experience with each one is something that should really be natural to them in the first place - the idea that form follows function.  Most of this problem is rooted in the fact that they are <em>not</em> web developers.  The most overlooked areas that I've noticed are those in SEO and in page load time.

<a href="http://www.jaredlunde.com/blog/web-design-for…llows-function/" title="Proper Web Design">Read the rest</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve coded a lot of websites for a lot of different designers and a common problem I experience with each one is something that should really be natural to them in the first place &#8211; the idea that form follows function.  Most of this problem stems from the fact that they are <em>not</em> web developers.  The most overlooked areas that I&#8217;ve noticed are those in SEO, usability and in page load time.</p>
<p><strong>Web Fonts</strong><br />
A well-known fact about non-developing designers is that they love to use not safe for web fonts.  This becomes more of a problem when they specifically request that a webpage looks <em>exactly</em> like their design.  The truth is that no matter how you slice it, web developers are limited in options when it comes to web fonts.  We shouldn&#8217;t use sIFR, because that can cause serious load time problems. Even with @font-face our hands are tied because we are limited to only free fonts due to redistribution clauses in font licenses.  The last resort is to use images to replace all of the good quality content that should be on the page.  An alt tag only does so much for search engines so we are really shooting ourselves in the foot in the form of Search Engine Optimization by using this method.  What is the purpose of producing a website that *looks good* if no one is going to see it in the first place?</p>
<p><strong>Page Titles</strong><br />
Another problem I have faced not only with web designers, but clients in general is that they like to use their page titles as cheesy marketing devices rather than for keyword optimization.  In a perfect world, I&#8217;d like to use something like <em>Works by Jared Lunde | Design Simplified</em>, but the reality of the matter is that I am much better off using a page title like <em>Logo Design &#038; Web Development | Madison, Wisconsin</em> because those are the key phrases that I am looking to get visits from.  Again, what is the purpose of making it look good if no one is visiting?</p>
<p><strong>Background Images</strong><br />
A major pet-peeve of mine is when I see a website that doesn&#8217;t take into account screen resolution sizes or load times with their web pages.  A designer should always be aware of typical screen resolution sizes and plan accordingly.  I&#8217;m also a firm believer that a background doesn&#8217;t need to be elaborate or textured and in some cases it definitely shouldn&#8217;t be.  While the background may look *cool* it is entirely possible that you are in fact doing harm to the experience by a) increasing load time by a <em>lot</em> or b) distracting from content that a visitor should be paying attention to.  I mention the former a lot because it really is the most important thing you need to consider when designing a web page. You never want to direct a visitor&#8217;s attention away from where they should be looking and with proper background usage, we can actually point them in the correct direction.  For instance, you&#8217;ll see a lot advertisements in magazines where something as subtle as lines in sand can be directing your eye attention to a specific phrase on the page.  It is entirely possible to harness those same techniques on a website and you should definitely consider it if you are going to be using a background image.</p>
<p><strong>Javascript</strong><br />
One final annoyance of mine is poor use of javascript effects.  Not all javascript effects are bad, in fact if used correctly they are amazing and can add a real wow-factor to the UI.  Some designers just don&#8217;t know how to use it correctly, though.  I&#8217;ve been on a few projects where a substantial amount of good information is hidden from a user&#8217;s view for the sole purpose of using javascript fade ins/outs.  The last thing we want to do is hide something we <strong>need</strong> the user to see from their eye line.  Another downfall of hiding information is that there is a <em>possibility</em> that hiding enough will actually start to harm your search rankings.  Because of this (and because some users have it turned off) there absolutely needs to be a no javascript backstop on the page where ever it is used.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaredlunde.com/blog/web-design-form-follows-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ways to Improve Your Website&#8217;s Performance</title>
		<link>http://www.jaredlunde.com/blog/improve-website-performance/</link>
		<comments>http://www.jaredlunde.com/blog/improve-website-performance/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 08:43:08 +0000</pubDate>
		<dc:creator>Jared Lunde</dc:creator>
				<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[browser cache]]></category>
		<category><![CDATA[document headers]]></category>
		<category><![CDATA[etags]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_deflate]]></category>
		<category><![CDATA[website performance]]></category>
		<category><![CDATA[website speed]]></category>

		<guid isPermaLink="false">http://www.jaredlunde.com/blog/?p=10</guid>
		<description><![CDATA[<h2 class="list-titles">1. Consolidate your javascript and css files</h2>
If you are embedding more than two javascript files per document or more than one CSS file per document, sorry, but you're doing it wrong.  It is much better to embed one 60K CSS or JS file than to embed three 20K files.  By doing so, you are making it easier for the browser to cache the files and you are reducing the number of HTTP requests your browser has to make on page load.

<a href="http://www.jaredlunde.com/blog/improve-website-performance/" title="improve website performance">Read the rest</a>]]></description>
			<content:encoded><![CDATA[<h2 class="list-titles">1. Consolidate your javascript and css files</h2>
<p>If you are embedding more than two javascript files per document or more than one CSS file per document, sorry, but you&#8217;re doing it wrong.  It is much better to embed one 60K CSS or JS file than to embed three 20K files.  By doing so, you are making it easier for the browser to cache the files and you are reducing the number of HTTP requests your browser has to make on page load.</p>
<h2 class="list-titles">2. Minify javascript and css</h2>
<p>If you are using jQuery or some other javascript framework they will have minified versions available.  Beyond that, you should only use what you need.  Do you really need every single effect that comes along with this framework?  Does this plugin really add anything to my interface?  K.I.S.S.  If you are writing your own javascript,  <a title="/packer/" rel="external nofollow" href="http://dean.edwards.name/packer/" target="_blank">/packer/</a> is a great resource for minifying your javascript.</p>
<p>You should only minify your CSS file after you are done writing it (for quicker formatting on your end).  If you Google &#8220;Compress CSS&#8221; there are plenty of resources available, although CSS Drive has my favorite.  Remember to back up your CSS file beforehand, just in case a) something goes wrong or b) you plan on redesigning your pages in the future.</p>
<h2 class="list-titles">3. Compress your javascript/css/html files</h2>
<p>I&#8217;ll admit, I was scared the first time I tried this.  The worst that can happen is you get a temporary 500 internal server error from your .htaccess file or php gzip compression just doesn&#8217;t work.  Not scary at all.  Also keep in mind that we&#8217;ll only want to compress plain text files such as php, css, html and javascript so as not to overload the CPU. The most important thing you&#8217;ll want to check before doing this is obviously if your server allows you to do so.  Unfortunately, different hosting companies offer different compression packages.  Most, if not all, allow the basic PHP compression ob_gzhandler and a happy few allow mod_gzip and mod_deflate in Apache.</p>
<p>If your server uses Apache2, mod_gzip is out of the picture so we&#8217;ll use mod_deflate instead.  Here is an example of basic compression with <strong>mod_deflate</strong>:<br />
<code><br />
&lt;IfModule mod_deflate.c&gt;<br />
</code><br />
<code><br />
SetOutputFilter DEFLATE<br />
</code><br />
<code><br />
#We can't compress images<br />
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \<br />
    no-gzip dont-vary<br />
</code><br />
<code><br />
#Don't compress executables<br />
SetEnvIfNoCase Request_URI \<br />
    \.(?:exe|t?gz|zip|bz2|sit|rar)$ \<br />
    no-gzip dont-vary<br />
</code><br />
<code><br />
#Don't compress pdf files<br />
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary<br />
</code><br />
<code><br />
&lt;/IfModule&gt;<br />
</code></p>
<p>If we are able to use <strong>mod_gzip</strong>, we&#8217;ll use this:<br />
<code><br />
&lt;IfModule mod_gzip.c&gt;<br />
</code><br />
<code><br />
    mod_gzip_on       Yes<br />
    mod_gzip_dechunk  Yes<br />
    mod_gzip_item_include file      \.(html?|txt|css|js|php|pl)$  #Compress plain text<br />
    mod_gzip_item_include handler   ^cgi-script$<br />
    mod_gzip_item_include mime      ^text/.*<br />
    mod_gzip_item_include mime      ^application/x-javascript.*<br />
    mod_gzip_item_exclude mime      ^image/.*  #Exclude images<br />
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*<br />
</code><br />
<code><br />
&lt;/IfModule&gt;<br />
</code></p>
<p>The above two examples are really the easiest way to do this, since .htaccess will take care of everything automatically.  If you are not allowed to implement either of the above, there is a php alternative.  What you&#8217;ll want to do is create a file in your includes called gzip.php and add the following:<br />
<code><br />
&lt;?<br />
if(isset($_SERVER['HTTP_ACCEPT_ENCODING']) &#038;&#038; substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))<br />
{<br />
	ob_start('ob_gzhandler');<br />
}<br />
else<br />
{<br />
	ob_start();<br />
}<br />
?&gt;<br />
</code></p>
<p>Add <? include('path/to/gzip.php'); ?> at the top of all of your main documents and then add the line <? ob_flush(); ?> to the bottom of each.  This will compress your html.  To compress your javascript files and css files there is slightly more work.  You&#8217;ll want to turn each javascript file into a .php and at the top of each include:<br />
<code><br />
&lt;?<br />
// start ob_gzhandler<br />
include('path/to/gzip.php');<br />
</code><br />
<code><br />
//set document type headers<br />
header ("Content-Type: text/javascript; charset: UTF-8");<br />
</code><br />
<code><br />
//set cache-control headers<br />
header("Cache-Control: must-revalidate");<br />
$addition = 60 * 60 * 24 * 365 ;<br />
$expires = "expires: " . gmdate("D, d M Y H:i:s", time() + $addition) . " GMT";<br />
</code><br />
<code><br />
//set expires headers to 1 year<br />
header($expires);<br />
?&gt;<br />
</code></p>
<p>and again you&#8217;ll want to add the &lt;? ob_flush(); &gt; to the bottom of each of those documents.  The above example is for javascript files, but you can use the same mold for CSS by changing Content-Type to text/css.  Your embed for javascript files would then look like:<br />
<code><br />
&lt;script type="text/javascript" src="path/to/javascript.php&lt;?='?v=' . filemtime($_SERVER['DOCUMENT_ROOT'].'/path/to/javascript.php');?&gt;"&gt;&lt;/script&gt;<br />
</code></p>
<h2 class="list-titles">4. Add expires headers, configure entity tags</h2>
<p>Why do we want to do this?  It is going to help the browser cache your files easier and the more files a browser caches of yours, the less HTTP requests the browser has to make.  Load time will also decrease because your browser will have to download fewer files to load the page.  To do this properly, simply add this to your .htaccess file:<br />
<code><br />
&lt;IfModule mod_headers.c&gt;<br />
</code><br />
<code><br />
#Revalidate in 1 hour<br />
&lt;FilesMatch "\.(html|htm)$"&gt;<br />
Header set Cache-Control "max-age=3600, must-revalidate"<br />
&lt;/FilesMatch&gt;<br />
</code><br />
<code><br />
#Cache expires in 1 year<br />
&lt;FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"&gt;<br />
Header set Cache-Control "max-age=290304000, public"<br />
Header unset Pragma<br />
Header unset Last-Modified<br />
FileETag MTime Size<br />
&lt;/FilesMatch&gt;<br />
</code><br />
<code><br />
#Never cache this, files are dynamic<br />
&lt;FilesMatch "\.(php)$"&gt;<br />
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform"<br />
Header set Pragma "no-cache"<br />
&lt;/FilesMatch&gt;<br />
</code><br />
<code><br />
&lt;/IfModule&gt;<br />
</code><br />
Because we are setting the expiration on our javascript and css files to 1 year and we may edit them within that time frame, we&#8217;ll want to add a version number to each of them.  To do this, simply change your embed code to resemble the following:<br />
<code><br />
&lt;script type="text/javascript" src="js/filename.js&lt;?='?v='.filemtime($_SERVER['DOCUMENT_ROOT'].'/path/to/js/filename.js');?&gt;"&gt;&lt;/script&gt;<br />
</code><br />
What the above code does is grab the file&#8217;s date of last modification (filemtime()) and appends it to the file name and what you end up with is something like this:<br />
<code><br />
&lt;script type="text/javascript" src="js/filename.js?v=1256944181"&gt;&lt;/script&gt;<br />
</code><br />
You can use this same method for your CSS files, as well.  Images that are updated may require renaming depending on which browser a visitor is using.</p>
<h2 class="list-titles">5. Cool it with the images</h2>
<p>This is a simple one.  Don&#8217;t be an idiot &#8211; if the image isn&#8217;t adding to the content/design or making it easier for a user to navigate the site, chances are you don&#8217;t need it.  The truth is, you can do a lot with CSS and you can make it look just as hot as you can with images.  You should also try to use png&#8217;s instead of jpg&#8217;s or gif&#8217;s whenever possible.  PNG&#8217;s provide the best quality in almost every situation and have generally have smaller file sizes.</p>
<h2 class="list-titles">6. Use CSS Sprites for background images</h2>
<p>This is especially important for things like rounded corners and menus that require more than 1 image to complete.  You can make a full menu <em>with </em>hovers included in one image.  <a href="http://css-tricks.com/css-sprites/" rel="nofollow external" target="_blank">CSS Tricks</a> has a great article on how to use CSS Sprites to your benefit.  They use jpg&#8217;s which, as you now know, I am totally against.  So just imagine that post including png&#8217;s and you should be all good.</p>
<p><a href="http://s.ytimg.com/yt/img/master-vfl125983.png" title="Youtube Master PNG" rel="nofollow external">This is YouTube&#8217;s master PNG file used for all background images</a></p>
<h2 class="list-titles">7. Download YSlow + Firebug or use some other free website optimization analyzer</h2>
<p>You can download YSlow and Firebug here: http://developer.yahoo.com/yslow/</p>
<p>There you have it, these are some simple steps you can take to get the most out of your website.  Feel free to ask any questions in comments or if you&#8217;re one of those types, call me an idiot.  To learn more about website performance and optimization, visit <a href="http://developer.yahoo.com/performance/rules.html" title="Performance Rules" rel="nofollow external">Yahoo Developer Network</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jaredlunde.com/blog/improve-website-performance/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
