<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Ardamis</title>
	
	<link>http://www.ardamis.com</link>
	<description>Ardamis is a blog about web development and technology in general.</description>
	<lastBuildDate>Sun, 01 Aug 2010 02:43:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/ardamis" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="ardamis" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Ardamis.com’s Google Page Speed score is 93/100</title>
		<link>http://www.ardamis.com/2010/07/30/ardamis-google-page-speed-score/</link>
		<comments>http://www.ardamis.com/2010/07/30/ardamis-google-page-speed-score/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 05:06:31 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=846</guid>
		<description><![CDATA[Ardamis.com has a Google PageSpeed score of 93/100, and that's not too shabby.]]></description>
			<content:encoded><![CDATA[<p>The results are in, and they&#8217;re good.  After <a href="http://www.ardamis.com/2010/07/11/compress-files-without-mod_gzip-or-mod_deflate/">compressing .php, .css and .js files without mod_gzip or mod_deflate</a> and <a href="http://www.ardamis.com/2010/07/17/sending-headers-to-leverage-browser-caching/">sending the correct headers to leverage browser caching</a>, Ardamis.com now has a Google Page Speed score of 93/100.</p>
<p><div id="attachment_848" class="wp-caption aligncenter" style="width: 431px"><a href="http://www.ardamis.com/wp-content/uploads/2010/07/ardamis-pagespeed-93-072910.png"><img src="http://www.ardamis.com/wp-content/uploads/2010/07/ardamis-pagespeed-93-072910.png" alt="Ardamis.com PageSpeed score of 93/100" title="ardamis-pagespeed-93-072910" width="421" height="356" class="size-full wp-image-848" /></a><p class="wp-caption-text">Ardamis.com Page Speed score of 93/100</p></div></p>
<p>Page Speed just keeps getting better, and it keeps getting tougher to score well.  I&#8217;m happy, but not satisfied yet.  The remaining hurdle is to serve static content from a cookieless domain.  I&#8217;m looking into the CDN offered by Amazon.com, but it&#8217;s a paid service.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/YDJg6Lix51pM6w_arHiGL0OLwMs/0/da"><img src="http://feedads.g.doubleclick.net/~a/YDJg6Lix51pM6w_arHiGL0OLwMs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/YDJg6Lix51pM6w_arHiGL0OLwMs/1/da"><img src="http://feedads.g.doubleclick.net/~a/YDJg6Lix51pM6w_arHiGL0OLwMs/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/30/ardamis-google-page-speed-score/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ardamis.com is HTML5</title>
		<link>http://www.ardamis.com/2010/07/21/ardamis-com-is-html5/</link>
		<comments>http://www.ardamis.com/2010/07/21/ardamis-com-is-html5/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 18:51:50 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=823</guid>
		<description><![CDATA[Ardamis.com is now being served as valid HTML5.]]></description>
			<content:encoded><![CDATA[<p>It required only a few small changes to move from XHTML 1.0 Strict to HTML5, but as of today, ardamis.com is being served as valid HTML5.  For some time, I&#8217;ve been waiting for HTML5 to get closer to becoming a W3C recommendation, and for better support from user agents, but I&#8217;ve gotten caught up with other improvements to the site and decided to make the transition now.</p>
<p>Over the next few weeks, I&#8217;ll be updating the HTML to incorporate some of the new tags.  I&#8217;m pretty excited about replacing divs with new semantic elements like <code>&lt;header&gt;</code>, <code>&lt;article&gt;</code>, and <code>&lt;footer&gt;</code>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/O8VeWZceG9XIw3aUlo0kVnCYgLA/0/da"><img src="http://feedads.g.doubleclick.net/~a/O8VeWZceG9XIw3aUlo0kVnCYgLA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/O8VeWZceG9XIw3aUlo0kVnCYgLA/1/da"><img src="http://feedads.g.doubleclick.net/~a/O8VeWZceG9XIw3aUlo0kVnCYgLA/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/21/ardamis-com-is-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to send the correct headers to leverage browser caching</title>
		<link>http://www.ardamis.com/2010/07/17/sending-headers-to-leverage-browser-caching/</link>
		<comments>http://www.ardamis.com/2010/07/17/sending-headers-to-leverage-browser-caching/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 23:23:39 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=794</guid>
		<description><![CDATA[How to use .htaccess to send the correct HTTP headers in order to leverage browser caching and reduce page load times for returning visitors.]]></description>
			<content:encoded><![CDATA[<p>As a follow-up to my post on <a href="http://www.ardamis.com/2010/07/11/compress-files-without-mod_gzip-or-mod_deflate/">compressing .php, .css and .js files without mod_gzip or mod_deflate</a>, I&#8217;m documenting the changes I made to the .htaccess file on ardamis.com in order to speed up page load times for returning visitors and satisfy the <a href="http://code.google.com/speed/page-speed/docs/caching.html#LeverageBrowserCaching">Leverage browser caching</a> recommendation of Google&#8217;s <a href="http://code.google.com/speed/page-speed/">Page Speed</a> Firefox/Firebug Add-on. </p>
<p>A great explanation of why browser caching helps the web deliver a better user experience is at <a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/">betterexplained.com</a>.</p>
<p>Two authoritative articles on the subject are Google&#8217;s <a href="http://code.google.com/speed/page-speed/docs/caching.html">Performance Best Practices | Optimize caching</a> and Yahoo&#8217;s <a href="http://developer.yahoo.com/performance/rules.html#expires">Best Practices for Speeding Up Your Web Site | Add an Expires or a Cache-Control Header</a>.</p>
<p>I&#8217;d like to point out that in researching browser cashing, I came across a lot of information that contradicted the rather clear instructions from Google:</p>
<blockquote><p>It is important to specify one of <code>Expires</code> or <code>Cache-Control max-age</code>, <i>and</i> one of <code>Last-Modified</code> or <code>ETag</code>, for all cacheable resources. It is redundant to specify both <code>Expires</code> and <code>Cache-Control: max-age</code>, or to specify both <code>Last-Modified</code> and <code>ETag</code>.</p></blockquote>
<p>I&#8217;m not sure that this recommendation is entirely correct, as the W3C states that Expires and Cache-Control max-age are used in different situations, with Cache-Control max-age overriding Expires in the event of conflicts.</p>
<blockquote><p>If a response includes both an Expires header and a max-age directive, the max-age directive overrides the Expires header, even if the Expires header is more restrictive. This rule allows an origin server to provide, for a given response, a longer expiration time to an HTTP/1.1 (or later) cache than to an HTTP/1.0 cache.</p>
<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a></p></blockquote>
<p>It would seem that Cache-Control is the preferred method of controlling browser caching going forward.</p>
<blockquote><p>HTTP 1.1 clients will honour &#8220;Cache-Control&#8221; (which is easier to use and much more flexible).<br />
HTTP 1.0 clients will ignore &#8220;Cache-Control&#8221; but honour &#8220;Expires&#8221;. With &#8220;Expires&#8221; you get thus at least a bit control for these old clients.</p>
<p><a href="http://www.peterbe.com/plog/cache-control_or_expires">http://www.peterbe.com/plog/cache-control_or_expires</a></p></blockquote>
<p>In any event, Page Speed won&#8217;t protest if you do end up sending both Expires and Cache-Control max-age, or if you remove both Last-Modified and ETag, but I was able to get the best results with just setting Cache-Control max-age and removing the ETag.</p>
<h2>Setting the headers in .htaccess</h2>
<p>On Apache, configuring the proper headers can be done in the .htaccess file, using the <code>Header</code> directive.  The <code>Header</code> directive requires the <code>mod_headers</code> module to be enabled.</p>
<p>I&#8217;m choosing to set a far future Expires header of one year on my images files, because I tweak the CSS and JavaScript pretty often, and don&#8217;t want those file types to be cached as long.</p>
<p>Add the following code to your .htaccess file to set your Cache-Control and Expires headers, adjusting the date to be one year from today.</p>
<pre class="brush: plain;">
# Set Cache-Control and Expires headers
&lt;filesMatch &quot;\\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$&quot;&gt;
Header set Cache-Control &quot;max-age=2592000, private&quot;
Header set Expires &quot;Sun, 17 July 2011 20:00:00 GMT&quot;
&lt;/filesMatch&gt;
&lt;filesMatch &quot;\\.(css|css.gz)$&quot;&gt;
Header set Cache-Control &quot;max-age=604800, private&quot;
&lt;/filesMatch&gt;
&lt;filesMatch &quot;\\.(js|js.gz)$&quot;&gt;
Header set Cache-Control &quot;max-age=604800, private&quot;
&lt;/filesMatch&gt;
&lt;filesMatch &quot;\\.(xml|txt)$&quot;&gt;
Header set Cache-Control &quot;max-age=216000, private, must-revalidate&quot;
&lt;/filesMatch&gt;
&lt;filesMatch &quot;\\.(html|htm)$&quot;&gt;
Header set Cache-Control &quot;max-age=7200, private, must-revalidate&quot;
&lt;/filesMatch&gt;
</pre>
<h2>Removing ETags in .htaccess</h2>
<p>Most sources recommend simply removing ETags if they are not required.</p>
<blockquote><p>Entity tags (ETags) are a mechanism that web servers and browsers use to determine whether the component in the browser&#8217;s cache matches the one on the origin server.<br />
&#8230;<br />
If you&#8217;re not taking advantage of the flexible validation model that ETags provide, it&#8217;s better to just remove the ETag altogether.</p>
<p><a href="http://developer.yahoo.com/performance/rules.html#etags">http://developer.yahoo.com/performance/rules.html#etags</a>
</p></blockquote>
<p>Add the following code to your .htaccess file to remove ETag headers.</p>
<pre class="brush: plain;">
# Turn off ETags
FileETag None
Header unset ETag
</pre>
<h2>Set Expires headers with ExpiresByType (optional)</h2>
<p>If your host has the <code>mod_expires</code> module enabled, you can specify Expires headers by file type.  Godaddy does not have this module enabled.</p>
<pre class="brush: plain;">
# Set Expires headers
ExpiresActive On
ExpiresDefault &quot;access plus 1 year&quot;
ExpiresByType text/html &quot;access plus 1 second&quot;
ExpiresByType image/gif &quot;access plus 2592000 seconds&quot;
ExpiresByType image/jpeg &quot;access plus 2592000 seconds&quot;
ExpiresByType image/png &quot;access plus 2592000 seconds&quot;
ExpiresByType image/x-icon &quot;access plus 2592000 seconds&quot;
ExpiresByType text/css &quot;access plus 604800 seconds&quot;
ExpiresByType text/javascript &quot;access plus 604800 seconds&quot;
ExpiresByType application/x-javascript &quot;access plus 604800 seconds&quot;
</pre>
<h2>Removing the Last-Modified header in .htaccess (optional)</h2>
<p>I&#8217;m following Google&#8217;s instructions and not removing the Last-Modified header, but if you wanted to do so, you could use:</p>
<pre class="brush: plain;">
# Remove Last-Modified header
Header unset Last-Modified
</pre>
<h2>Busting the cache when files change</h2>
<p>What happens when you change files and need to force browsers to load the new files? Christian Johansen offers two methods in his post on <a href="http://cjohansen.no/en/apache/using_a_far_future_expires_header">Using a far future expires header</a>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Uql258WEMRLMpaKfSQwKzD3SaUY/0/da"><img src="http://feedads.g.doubleclick.net/~a/Uql258WEMRLMpaKfSQwKzD3SaUY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Uql258WEMRLMpaKfSQwKzD3SaUY/1/da"><img src="http://feedads.g.doubleclick.net/~a/Uql258WEMRLMpaKfSQwKzD3SaUY/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/17/sending-headers-to-leverage-browser-caching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I want this Microsoft LifeCam Cinema webcam</title>
		<link>http://www.ardamis.com/2010/07/14/microsoft-lifecam-cinema/</link>
		<comments>http://www.ardamis.com/2010/07/14/microsoft-lifecam-cinema/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 05:24:28 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Materialism]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=712</guid>
		<description><![CDATA[I want the Microsoft LifeCam Cinema webcam.]]></description>
			<content:encoded><![CDATA[<p>I want this webcam.</p>
<p><div id="attachment_713" class="wp-caption aligncenter" style="width: 360px"><a href="http://www.amazon.com/gp/product/B002MCZJ78?ie=UTF8&#038;tag=ardamiscom-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B002MCZJ78"><img src="http://www.ardamis.com/wp-content/uploads/2010/07/Microsoft-LifeCam-Cinema.jpg" alt="Microsoft LifeCam Cinema" title="Microsoft LifeCam Cinema" width="350" height="350" class="size-full wp-image-713" /></a><p class="wp-caption-text">Microsoft LifeCam Cinema</p></div></p>
<p><a href="http://www.amazon.com/gp/product/B002MCZJ78?ie=UTF8&#038;tag=ardamiscom-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=B002MCZJ78">Microsoft LifeCam Cinema</a><img src="http://www.assoc-amazon.com/e/ir?t=ardamiscom-20&#038;l=as2&#038;o=1&#038;a=B002MCZJ78" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><br />
720p HD video webcam with noise-canceling microphone</p>

<p><a href="http://feedads.g.doubleclick.net/~a/TGqZnaxf4-HkbYCcQM8C-ma8kUE/0/da"><img src="http://feedads.g.doubleclick.net/~a/TGqZnaxf4-HkbYCcQM8C-ma8kUE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/TGqZnaxf4-HkbYCcQM8C-ma8kUE/1/da"><img src="http://feedads.g.doubleclick.net/~a/TGqZnaxf4-HkbYCcQM8C-ma8kUE/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/14/microsoft-lifecam-cinema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One million inbound links</title>
		<link>http://www.ardamis.com/2010/07/13/one-million-inbound-links/</link>
		<comments>http://www.ardamis.com/2010/07/13/one-million-inbound-links/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 12:32:14 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Web Site Dev]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=747</guid>
		<description><![CDATA[Google Webmaster Tools is reporting over one million inbound links to pages on ardamis.com.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to note that, as of today, Google Webmaster Tools is reporting over one million inbound links to pages on ardamis.com.</p>
<p><div id="attachment_748" class="wp-caption aligncenter" style="width: 432px"><a href="http://www.ardamis.com/wp-content/uploads/2010/07/one-million-inbound-links.png"><img src="http://www.ardamis.com/wp-content/uploads/2010/07/one-million-inbound-links.png" alt="one million inbound links" title="one million inbound links" width="422" height="251" class="size-full wp-image-748" /></a><p class="wp-caption-text">One million inbound links!</p></div></p>
<p>I&#8217;ve been spending quite a bit of time on ardamis.com lately, giving it a new look, working at improving the site&#8217;s navigation, cultivating some inbound links, and posting more regularly.  It&#8217;s rewarding to see that the effort is paying off.</p>
<p>Over the last few days, I&#8217;ve been concentrating on reducing page load times by sending the proper headers and compressing files.</p>
<p>I&#8217;ll give it some time and see how performance improves.</p>
<p>According to Google&#8217;s Webmaster Tools&#8217; performance overview, with Super Cache running, a single minified CSS, a single minified JavaScript, etc. but no compression or header tweaks:<br />
On average, pages in your site take 2.8 seconds to load (updated on Jun 28, 2010). This is faster than 53% of sites.</p>
<p>The chart illustrating page load times is pretty much all over the place, but at no time has the site dipped into the 20th percentile, indicating a &#8216;fast&#8217; site.  I&#8217;m trying to change that.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/_RBRhvkUNdKGZMyrEaVpzcXc14I/0/da"><img src="http://feedads.g.doubleclick.net/~a/_RBRhvkUNdKGZMyrEaVpzcXc14I/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_RBRhvkUNdKGZMyrEaVpzcXc14I/1/da"><img src="http://feedads.g.doubleclick.net/~a/_RBRhvkUNdKGZMyrEaVpzcXc14I/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/13/one-million-inbound-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to compress .php, .css and .js files without mod_gzip or mod_deflate</title>
		<link>http://www.ardamis.com/2010/07/11/compress-files-without-mod_gzip-or-mod_deflate/</link>
		<comments>http://www.ardamis.com/2010/07/11/compress-files-without-mod_gzip-or-mod_deflate/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 04:42:27 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=753</guid>
		<description><![CDATA[How to speed up page load times by compressing .php, .css and .js files on Apache web hosts that do not have mod_gzip or mod_deflate enabled.]]></description>
			<content:encoded><![CDATA[<p>File compression is possible on Apache web hosts that do not have mod_gzip or mod_deflate enabled, and it&#8217;s easier than you might think.</p>
<p>A great explanation of why compression helps the web deliver a better user experience is at <a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/">betterexplained.com</a>.</p>
<p>Two authoritative articles on the subject are Google&#8217;s <a href="http://code.google.com/speed/page-speed/docs/payload.html#GzipCompression">Performance Best Practices documentation | Enable compression</a> and Yahoo&#8217;s <a href="http://developer.yahoo.com/performance/rules.html#gzip">Best Practices for Speeding Up Your Web Site | Gzip Components</a>.</p>
<h2>Compressing PHP files</h2>
<p>If your Apache server does not have mod_gzip or mod_deflate enabled (Godaddy shared hosting, for one), you can use PHP to compress pages on the fly.  This is still preferable to sending uncompressed files to the browser, so don&#8217;t worry about the additional work the server has to do to compress the files at each request.  Add the following line of code to the top of your PHP pages, above the DOCTYPE declaration or first line of output:</p>
<pre class="brush: plain;">
&lt;?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start(&quot;ob_gzhandler&quot;); else ob_start(); ?&gt;
</pre>
<p>Credit: <a href="http://help.godaddy.com/article/4485">GoDaddy.com</a></p>
<h2>Compressing CSS and JavaScript files</h2>
<p>Because the on-the-fly method above only works for PHP pages, you&#8217;ll need something else to compress CSS and JavaScript files.  These can be gzipped ahead of time, then uploaded along side the normal files.  Use <a href="http://www.7-zip.org/">7-Zip</a> (quite possibly the best compression software around, and it&#8217;s free) to compress the CSS and JavaScript files as gzip, then upload them to your server.  Add the following lines to your .htaccess file to send user agents the gzipped versions if they support the encoding.</p>
<pre class="brush: plain;">
&lt;files *.js.gz&gt;
  AddType &quot;text/javascript&quot; .gz
  AddEncoding gzip .gz
&lt;/files&gt;
&lt;files *.css.gz&gt;
  AddType &quot;text/css&quot; .gz
  AddEncoding gzip .gz
&lt;/files&gt;
RewriteEngine on
#Check to see if browser can accept gzip files.
ReWriteCond %{HTTP:accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
#make sure there's no trailing .gz on the url
ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$
#check to see if a .gz version of the file exists.
RewriteCond %{REQUEST_FILENAME}.gz -f
#All conditions met so add .gz to URL filename (invisibly)
RewriteRule ^(.+) $1.gz [QSA,L]
</pre>
<p>Credit: <a href="http://www.opensourcetutor.com/2009/06/01/how-to-compress-css-javascript-an-alternative-to-mod_deflate-or-mod_gzip/">opensourcetutor.com</a></p>
<p>I&#8217;m not sure it&#8217;s still necessary to exclude Safari.</p>
<p>For added benefit, minify the CSS and JavaScript files before gzipping them.  Google&#8217;s excellent <a href="http://code.google.com/speed/page-speed/">Page Speed</a> Firefox/Firebug Add-on makes this very easy.</p>
<h2>Verify that your content is being compressed</h2>
<p>Use the nifty Web Page Content Compression Verification tool at <a href="http://www.whatsmyip.org/http_compression/">http://www.whatsmyip.org/http_compression/</a> to confirm that your server is sending the compressed files.</p>
<h2>Speed up page load times for returning visitors</h2>
<p>Compression is only part of the story.  In order to further speed page load times for your returning visitors, you want to <a href="http://www.ardamis.com/2010/07/17/sending-headers-to-leverage-browser-caching/">send the correct headers to leverage browser caching</a>.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/By5H1TG5fGJWSToNEzUbHO2rdSY/0/da"><img src="http://feedads.g.doubleclick.net/~a/By5H1TG5fGJWSToNEzUbHO2rdSY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/By5H1TG5fGJWSToNEzUbHO2rdSY/1/da"><img src="http://feedads.g.doubleclick.net/~a/By5H1TG5fGJWSToNEzUbHO2rdSY/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/11/compress-files-without-mod_gzip-or-mod_deflate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to programmatically disable Adobe Updater</title>
		<link>http://www.ardamis.com/2010/07/08/how-to-programmatically-disable-adobe-updater/</link>
		<comments>http://www.ardamis.com/2010/07/08/how-to-programmatically-disable-adobe-updater/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 05:22:30 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=734</guid>
		<description><![CDATA[How to disable the 'Automatically check for Adobe updates' feature by editing or replacing a settings file while avoiding the GUI.]]></description>
			<content:encoded><![CDATA[<p>By default, the Adobe Updater application that is installed along side various Adobe products like Acrobat and Photoshop is set to check for updates automatically.  Specifically, it&#8217;s set to check for updates to all installed Adobe products every week, and to download all updates and then notify you when they are ready to be installed.  In this post, I&#8217;ll explain how to disable this feature by editing a settings file while avoiding the GUI.</p>
<p><div id="attachment_736" class="wp-caption aligncenter" style="width: 532px"><a href="http://www.ardamis.com/wp-content/uploads/2010/07/Adobe-Updater-Preferences.png"><img src="http://www.ardamis.com/wp-content/uploads/2010/07/Adobe-Updater-Preferences.png" alt="Adobe Updater Preferences" title="Adobe-Updater-Preferences" width="522" height="477" class="size-full wp-image-736" /></a><p class="wp-caption-text">Adobe Updater Preferences</p></div></p>
<p>In a managed environment, an administrator may not want any software to update itself for any number of reasons.  The automatic check can be switched off in the Adobe Updater preferences, but it can be a nuisance to find and requires as many as 9 clicks.</p>
<p>Adobe Updater can be launched from within Adobe products by clicking <strong>Help | Check for Updates</strong> (note that in some products, the path is <strong>Help | Updates</strong>, but in either case, you can use the keystroke <strong>Alt+H, U</strong>).  Click <strong>Preferences</strong>, then uncheck the box next to <strong>Automatically check for Adobe updates</strong> and click <strong>OK</strong>, then close the Adobe Updater window.  You may have to click <strong>Quit</strong> in a subsequent window before the application closes.</p>
<p>For a more direct route, the Adobe Updater executable installed with Reader 9 resides at<br />
<strong>C:\Program Files (x86)\Common Files\Adobe\Updater6\AdobeUpdater.exe</strong> on a 64-bit Windows 7 machine, and at<br />
<strong>C:\Program Files\Common Files\Adobe\Updater6\AdobeUpdater.exe</strong> on a 32-bit Windows XP machine.  </p>
<p>All of the configurable settings are saved to a file named AdobeUpdaterPrefs.dat in the user profile, rather than as registry keys.  The .dat file extension suggests a binary file, but it&#8217;s actually just an XML document that can be opened in any text editor.</p>
<p>The preferences file resides at<br />
<strong>C:\Users\[USERNAME]\AppData\Local\Adobe\Updater6\AdobeUpdaterPrefs.dat</strong> on a 64-bit Windows 7 machine, and at<br />
<strong>C:\Documents and Settings\[USERNAME]\Local Settings\Application Data\Adobe\Updater6\AdobeUpdaterPrefs.dat</strong> on a 32-bit Windows XP machine.  </p>
<p>The minimum lines that need to exist for the file to be valid and for &#8220;Automatically check for Adobe updates&#8221; to be disabled are:</p>
<pre class="brush: plain;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;AdobeUpdater&gt;
&lt;AutoCheck&gt;0&lt;/AutoCheck&gt;
&lt;/AdobeUpdater&gt;
</pre>
<p>To disable the auto update check programmatically, this file can be saved as AdobeUpdaterPrefs.dat and a script used to later overwrite the file in the user profile.  A rather geekier approach would be to use a batch file to rename AdobeUpdaterPrefs.dat and then write a new file.  I prefer the latter method because it requires only a single file and because it could be easily modified to insert lines that would change other settings, such as the location of the aum.log log file or the download directory, which are located in the user profile by default.</p>
<p>A batch file to back-up and then remake the file might look like this:</p>
<pre class="brush: plain; pad-line-numbers: false;">
:: A batch file for writing a new Adobe Updater settings file &quot;AdobeUpdaterPrefs.dat&quot;
@echo off

%SystemDrive%
cd\
SETLOCAL EnableDelayedExpansion
if exist &quot;%USERPROFILE%\AppData\Local\Adobe\Updater6\AdobeUpdaterPrefs.dat&quot; goto WIN7Updater6
if exist &quot;%USERPROFILE%\AppData\Local\Adobe\Updater5\AdobeUpdaterPrefs.dat&quot; goto WIN7Updater5
if exist &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater6\AdobeUpdaterPrefs.dat&quot; goto XPUpdater6
if exist &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat&quot; goto XPUpdater5
goto NOTFOUND

:WIN7Updater6
cd &quot;%USERPROFILE%\AppData\Local\Adobe\Updater6&quot;
goto REWRITE

:WIN7Updater5
cd &quot;%USERPROFILE%\AppData\Local\Adobe\Updater5&quot;
goto REWRITE

:XPUpdater6
cd &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater6&quot;
goto REWRITE

:XPUpdater5
cd &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater5&quot;
goto REWRITE

:REWRITE
:: Configure Adobe Update to not check for updates
:: Delete any temp file that this script may have created in the past
if exist AdobeUpdaterPrefs.dat.temp del AdobeUpdaterPrefs.dat.temp
:: Backup the old file
rename AdobeUpdaterPrefs.dat AdobeUpdaterPrefs.dat.temp
:: Write a new minimum settings file (the other data will be filled in when Auto Updater runs)
echo ^&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;AdobeUpdater^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;AutoCheck^&gt;0^&lt;/AutoCheck^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;/AdobeUpdater^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
:: Rename the new file
rename AdobeUpdaterPrefs.txt AdobeUpdaterPrefs.dat
goto :EOF

:NOTFOUND
@echo.
@echo The AdobeUpdaterPrefs.dat file was not found, no changes have been made.

@pause
</pre>
<p>Modifying the preferences file could have other benefits as well.  Imagine the time and disk space that could saved by having all of those incremental Adobe updates saved to a network location, rather than downloading them to each workstation.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Ijl3YaJUEJTrwbpestwjZnzGxho/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ijl3YaJUEJTrwbpestwjZnzGxho/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Ijl3YaJUEJTrwbpestwjZnzGxho/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ijl3YaJUEJTrwbpestwjZnzGxho/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/08/how-to-programmatically-disable-adobe-updater/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to delete Flash cookies (Local Shared Objects)</title>
		<link>http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/</link>
		<comments>http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 05:59:09 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=755</guid>
		<description><![CDATA[How to create a small batch file to delete Local Shared Objects, commonly called Flash cookies.]]></description>
			<content:encoded><![CDATA[<p>In this post, I&#8217;ll explain how to delete files known as Flash cookies from a Windows computer using a batch file.</p>
<p>Most people are familiar with the concept of cookies &#8211; small files saved to your computer by the web sites you visit &#8211; and how to delete them.  But there is a wide-spread misconception that simply deleting your cookies erases your tracks.  Even when you&#8217;ve instructed your browser to delete cookies and browsing history, a potentially large collection of files remains, and the paths to these files contain the domain names of the sites that have placed them on your computer.</p>
<blockquote><p>Local Shared Objects (LSO), commonly called Flash cookies, are collections of cookie-like data stored as a file on a user&#8217;s computer.  LSOs are used by all versions of Adobe Flash Player&#8230;</p>
<p>With the default settings, Adobe Flash Player does not seek the user&#8217;s permission to store LSO files on the hard disk.</p>
<p>There is relatively little public awareness of LSOs, and they can usually not be deleted by the cookie privacy controls in a web browser.</p>
<p><a href="http://en.wikipedia.org/wiki/Local_Shared_Object">http://en.wikipedia.org/wiki/Local_Shared_Object</a></p></blockquote>
<p>The files are saved to two locations in the roaming profile:<br />
<strong>%APPDATA%\Macromedia\Flash Player\#SharedObjects</strong><br />
and<br />
<strong>%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys</strong></p>
<p>As an example, a visit to YouTube will result in the following folders being created:<br />
C:\Users\Oliver\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\98X5KV83\s.ytimg.com<br />
C:\Users\Oliver\AppData\Roaming\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\#s.ytimg.com</p>
<p>Create a text file with the following lines, then save it as <strong>deleteLSOs.bat</strong>.  Run the batch file to delete and remake these folders, thereby clearing all of the subfolders and files.</p>
<pre class="brush: plain;">
@echo off
rmdir /s /q &quot;%APPDATA%\Macromedia\Flash Player\#SharedObjects&quot;
md &quot;%APPDATA%\Macromedia\Flash Player\#SharedObjects&quot;
rmdir /s /q &quot;%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys&quot;
md &quot;%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys&quot;
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/wXWkuurHNEErOHN-H5c7QQIko7A/0/da"><img src="http://feedads.g.doubleclick.net/~a/wXWkuurHNEErOHN-H5c7QQIko7A/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/wXWkuurHNEErOHN-H5c7QQIko7A/1/da"><img src="http://feedads.g.doubleclick.net/~a/wXWkuurHNEErOHN-H5c7QQIko7A/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I want this CSS IS AWESOME coffee mug</title>
		<link>http://www.ardamis.com/2010/07/06/css-is-awesome-coffee-mug/</link>
		<comments>http://www.ardamis.com/2010/07/06/css-is-awesome-coffee-mug/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 04:25:36 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Materialism]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=720</guid>
		<description><![CDATA[I want this mug.]]></description>
			<content:encoded><![CDATA[<p>I want this coffee mug.</p>
<p><div id="attachment_721" class="wp-caption aligncenter" style="width: 410px"><a href="http://www.zazzle.com/css_is_awesome_mug-168716435071981928"><img src="http://www.ardamis.com/wp-content/uploads/2010/07/css-is-awesome-mug.jpg" alt="CSS IS AWESOME" title="css-is-awesome-mug" width="400" height="400" class="size-full wp-image-721" /></a><p class="wp-caption-text">CSS IS AWESOME</p></div></p>
<p><a href="http://www.zazzle.com/css_is_awesome_mug-168716435071981928">CSS IS AWESOME coffee mug</a></p>

<p><a href="http://feedads.g.doubleclick.net/~a/SIuKrdU1jqpFsOA8hLaGff2pwxk/0/da"><img src="http://feedads.g.doubleclick.net/~a/SIuKrdU1jqpFsOA8hLaGff2pwxk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/SIuKrdU1jqpFsOA8hLaGff2pwxk/1/da"><img src="http://feedads.g.doubleclick.net/~a/SIuKrdU1jqpFsOA8hLaGff2pwxk/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/06/css-is-awesome-coffee-mug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Compete.com tracking code is not for traffic</title>
		<link>http://www.ardamis.com/2010/07/04/compete-is-not-for-traffic/</link>
		<comments>http://www.ardamis.com/2010/07/04/compete-is-not-for-traffic/#comments</comments>
		<pubDate>Sun, 04 Jul 2010 05:11:59 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=724</guid>
		<description><![CDATA[How the Compete tracking code shares your visitor information with FOX / News Corp. and why it doesn't do you any good when it comes to gathering analytic information.]]></description>
			<content:encoded><![CDATA[<p>I had noticed mentions of <em>analytic information provided by Compete.com</em> often enough that I was curious about what it could do for me.  </p>
<p>Compete already had some <a href="http://www.compete.com/m/profiles/site/ardamis.com/">information about ardamis.com</a>, but it was stunningly wrong.  For example, it was telling me that the phrase &#8220;godaddy referral program&#8221; was responsible for 20.35% of the total traffic sent to my site by search engines.  Until recently, I did have a page that mentioned godaddy referral programs, but according to Google Analytics, it was barely ever visited (7 page views in the last 30 days &#8211; it was the 78th most popular page on my site, which does get a few thousand visitors a month).  Even more strange, it told me that I was getting traffic for the search phrase &#8220;myspace&#8221;.  I have never written anything about myspace before.</p>
<p>I figured that once I installed their JavaScript tracking code, the analytics information would be much more accurate.  So I installed the code, confirmed it appeared at the bottom of the home page, and attempted to verify my site at http://www.ardamis.com/, but was unable to.  I had read somewhere that the free account does not support tracking subdomains, and the verification process seemed to get hung up on the use of .htaccess to redirect non-www traffic to www.ardamis.com.  I was mystified that Compete apparently could not recognize this was happening via a 301 redirect header and compensate.</p>
<blockquote><p>Sorry,</p>
<p>It looks like the CompeteXL code has not been correctly placed on the homepage of your site.</p>
<p>This could be because either the code was not copied over correctly, or because it has been placed on the wrong page.</p>
<p>We think your homepage is</p>
<p>ardamis.com</p></blockquote>
<p>I went so far as to email my amazement to their support staff, who promptly and politely wrote me back.  (Thumbs up to the guys answering the emails.)</p>
<p>I had made a few other changes to my site at the same time, so I ran a <a href="http://code.google.com/speed/page-speed/">Page Speed</a> check on it.  Page Speed told me that I was linking to a resource at trgc.opt.fimserve.com that was throwing a 404 error.  I was pretty sure I didn&#8217;t intentionally link to anything at that domain, so I Googled it.  Surprisingly, there&#8217;s not much out there on trgc.opt.fimserve.com other than <a href="http://wordpress.org/support/topic/337084">this</a> and <a href="http://www.webmasterworld.com/analytics/4038221.htm">this</a>.  As it turns out, fimserve.com is part of something called the <a rel="nofollow" href="http://www.foxaudiencenetwork.com/">FOX Audience Network</a>, and FAN&#8217;s parent company is News Corporation, which also owns myspace.com.</p>
<p>Here&#8217;s the WHOIS on fimserve.com:</p>
<pre>
Domain Name: FIMSERVE.COM
Registrar: REGISTER.COM, INC.
Whois Server: whois.register.com
Referral URL: http://www.register.com
Name Server: NS1.MYSPACE.COM
Name Server: NS2.MYSPACE.COM
Status: clientTransferProhibited
Updated Date: 17-oct-2006
Creation Date: 17-oct-2006
Expiration Date: 17-oct-2011
</pre>
<p>And here&#8217;s the WHOIS on foxaudiencenetwork.com:</p>
<pre>
Domain Name: FOXAUDIENCENETWORK.COM
Registrar: MARKMONITOR INC.
Whois Server: whois.markmonitor.com
Referral URL: http://www.markmonitor.com
Name Server: NS1.MYSPACE.COM
Name Server: NS2.MYSPACE.COM
Status: clientDeleteProhibited
Status: clientTransferProhibited
Status: clientUpdateProhibited
Updated Date: 03-may-2010
Creation Date: 03-jun-2008
Expiration Date: 03-jun-2011
</pre>
<p>I didn&#8217;t like the idea that information about my visitors was being shared with anyone but the site I had signed up for, so I started looking through the Compete FAQs and found this:</p>
<blockquote><p>Currently, the CompeteXL code tracks ONLY self-reported Audience Profile data through a partnership with the FOX Audience Network.</p>
<p>The CompeteXL code DOES NOT track traffic or user engagement metrics, that information continues to be provided through our multi-sourced panel and requires NO addition of code to your site.</p>
<p><a rel="nofollow" href="http://www.compete.com/help/q225">http://www.compete.com/help/q225</a></p></blockquote>
<p><em>What the hell?</em>  Why am I installing a tracking code if it&#8217;s not used to track traffic?</p>
<p>Oh, and this was a fun discovery, too:</p>
<blockquote><p>The FOX Audience Network (FAN) is a unit of News Corporation that supports monetization efforts across the company&#8217;s online content portfolio, as well as third-party publisher sites.</p>
<p>FAN leverages proprietary advertising technology to create highly-targeted advertising campaigns for a wide range of marketers, while also delivering cutting-edge tools and services to third-party publisher partners. FAN works directly with hundreds of advertisers to develop customized marketing programs that optimize both branded and performance-based strategies.</p>
<p><a rel="nofollow" href="http://www.foxaudiencenetwork.com/aboutus.php">http://www.foxaudiencenetwork.com/aboutus.php</a>
</p></blockquote>
<p>I use a very popular <a href="http://www.mvps.org/winhelp2002/hosts.htm">HOSTS file</a> to block a huge number of servers that are known to host advertisements, tracking scripts (including Google Analytics), parasites, hijackers and unwanted Adware/Spyware programs.  The 404 error in Page Speed was caused by the inclusion of trgc.opt.fimserve.com in this custom HOSTS file, which then led me to finding all this out the next day.  I&#8217;ve removed the tracking code because the information I wanted was on traffic &#8211; who&#8217;s coming to my site, why, and through what means &#8211; and not user demographics.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/2vWnVlG4YPeptJMejltuGY3h3-c/0/da"><img src="http://feedads.g.doubleclick.net/~a/2vWnVlG4YPeptJMejltuGY3h3-c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/2vWnVlG4YPeptJMejltuGY3h3-c/1/da"><img src="http://feedads.g.doubleclick.net/~a/2vWnVlG4YPeptJMejltuGY3h3-c/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/04/compete-is-not-for-traffic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
