<?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>Seifi.org &#187; server</title>
	<atom:link href="http://www.seifi.org/category/server/feed" rel="self" type="application/rss+xml" />
	<link>http://www.seifi.org</link>
	<description>A Web Development Blog by Joe Seifi - seifi.org</description>
	<lastBuildDate>Thu, 12 Aug 2010 05:35:09 +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>YSlow Review, add-on for the firebug add-on</title>
		<link>http://www.seifi.org/performance/yslow-review-the-firebug-addon.html</link>
		<comments>http://www.seifi.org/performance/yslow-review-the-firebug-addon.html#comments</comments>
		<pubDate>Wed, 25 Jul 2007 19:29:29 +0000</pubDate>
		<dc:creator>Joe Seifi</dc:creator>
				<category><![CDATA[performance]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.seifi.org/performance/yslow-the-firebug-extension-extension.html</guid>
		<description><![CDATA[I&#8217;ve been playing around with YSlow, the&#160;add-on to the FireBug&#160;add-on&#160;which analyzes web pages and tells you why they&#8217;re slow based on the rules for high performance web sites, and assigns a letter grade. Basically all the sites I am running through it are getting a C grade so I decided to dig deeper. YSlow uses [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around with <a href="http://developer.yahoo.com/yslow/">YSlow</a>, the&nbsp;<a href="https://addons.mozilla.org/en-US/firefox/addon/5369">add-on</a> to the <a href="http://www.seifi.org/firebug/firebug_tips_and_tricks.html">FireBug</a>&nbsp;<a href="http://www.getfirebug.com/">add-on</a>&nbsp;which analyzes web pages and tells you why they&#8217;re slow based on the <a href="http://developer.yahoo.com/performance/index.html#rules">rules for high performance web sites</a>, and assigns a letter grade. Basically all the sites I am running through it are getting a C grade so I decided to dig deeper. YSlow uses 13 points to come up with the grade. These rules are as follows:</p>
<p> <span id="more-586"></span>
<ol>
<li>Make fewer HTTP requests
<li>Use a CDN
<li>Add an Expires header
<li>Gzip components
<li>Put CSS at the top
<li>Move scripts to the bottom
<li>Avoid CSS expressions
<li>Make JS and CSS external
<li>Reduce DNS lookups
<li>Minify JS
<li>Avoid redirects
<li>Remove duplicate scripts
<li>Configure ETags</li>
</ol>
<p>My blog gets a&nbsp;C grade, ouch, but shouldn&#8217;t 79 really be C+ or B-?</p>
<p><img height="345" src="http://www.seifi.org/wp-content/uploads/2007/07/yslow-report-thumb1.gif" width="356" border="0"> </p>
<p><strong>So How are the grades computed?</strong> </p>
<p>This is from the <a href="http://developer.yahoo.com/yslow/help/">docs</a> for YSlow which outlines these rules and give you more tips on what to do to improve your grade.</p>
<blockquote><p>The grades for individual rules are computed differently depending on the rule. For example, for Rule 1, <u>three external scripts are allowed</u>. For each script above that, four points are deducted from the grade. The code for grading each rule is found in <u>lint.js</u>. The overall grade is a weighted average of the individual grades for each rule. The rules are <u>approximately in order of importance</u>, most important first. The specific weights are in the lintweights array in <u>yslowcontext.js</u>.</p>
</blockquote>
<p><p>Here is the specific array mentioed above with the weights assigned to each rule:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">lintweights</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #3366CC;">&quot;NumComps&quot;</span>     <span style="color: #339933;">:</span> <span style="color: #CC0000;">8</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;CDN&quot;</span>          <span style="color: #339933;">:</span> <span style="color: #CC0000;">6</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;Expires&quot;</span>      <span style="color: #339933;">:</span> <span style="color: #CC0000;">10</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;Gzip&quot;</span>         <span style="color: #339933;">:</span> <span style="color: #CC0000;">8</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;CssAtTop&quot;</span>     <span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;JsAtBottom&quot;</span>   <span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;Expression&quot;</span>   <span style="color: #339933;">:</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;ExternalFiles&quot;</span><span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;Domains&quot;</span>      <span style="color: #339933;">:</span> <span style="color: #CC0000;">3</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;Obfuscate&quot;</span>    <span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;Redirects&quot;</span>    <span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;JsTwice&quot;</span>      <span style="color: #339933;">:</span> <span style="color: #CC0000;">4</span><span style="color: #339933;">,</span>
        <span style="color: #3366CC;">&quot;ETags&quot;</span>        <span style="color: #339933;">:</span> <span style="color: #CC0000;">2</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

</p>
<p>Let&#8217;s look at why I got some the grades.</p>
<h3>Rule #2 Use a CDN</h3>
<p>I got a letter of F in rule 2&nbsp;for not using a CDN.&nbsp;Is Yahoo getting paid to promote <a href="http://www.akamai.com/">Akamai</a>? No but seriously, I doubt any personal blogs are going to start using professional CDNs anytime soon, not unless they are super successful. But if you are using your own personal image cache servers you should add your server host to&nbsp;the list of &#8220;known CDNs&#8221;, because the default CDNs are the ones used by Yahoo! and chances are these are not relevant to your web site. Here&#8217;s how to add them according to the YSlow docs.</p>
<ol>
<ol>
<li>Go to <code>about:config</code> in Firefox. You&#8217;ll see the current list of preferences.
<li>Right-click in the window and choose New and String to create a new string preference.
<li>Enter <code>extensions.firebug.yslow.cdnHostnames</code> for the preference name.
<li>For the string value, enter the hostname of your CDN, for example, <code>mycdn.com</code>. Do not use quotes. If you have multiple CDN hostnames, separate them with commas. </li>
</ol>
</ol>
<h3>Rule #3 Add an Expires header </h3>
<p>This rule suggests adding Expires tags using the Apache server setttings. According to research at Yahoo they have come up with the <a href="http://yuiblog.com/blog/2006/11/28/performance-research-part-1/">80/20 rule</a> of reducing HTTP traffic.</p>
<blockquote><p>Since browsers spend 80% of the time fetching external components including scripts, stylesheets and images, reducing the number of HTTP requests has the biggest impact on reducing response time.</p>
</blockquote>
<p>These are the complaints YSlow has for my Expires tags. </p>
<ul style="color:#f00;font-size:11px;list-style-type:none;margin:0;padding:0;">These components do not have a far future Expires header:
<li><img title="HTTP headers" height="10" src="http://us.i1.yimg.com/us.yimg.com/i/rt/yslow/magnify.gif" width="11" border="0">&nbsp;(7/26/2007) http://pagead2.googlesyndication.com/pagead/show_ads.js
<li><img title="HTTP headers" height="10" src="http://us.i1.yimg.com/us.yimg.com/i/rt/yslow/magnify.gif" width="11" border="0">&nbsp;(no expires) http://stats.wordpress.com/e-200730.js
<li><img title="HTTP headers" height="10" src="http://us.i1.yimg.com/us.yimg.com/i/rt/yslow/magnify.gif" width="11" border="0">&nbsp;(7/26/2007) http://edge.quantserve.com/quant.js</li>
</ul>
<p></p>
<p>Here are the docs for using <a href="http://httpd.apache.org/docs/1.3/mod/mod_expires.html">mod_expires</a>.&nbsp; In this environment you can turn on this expires setting in your .htaccess file using these directives:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_expires.c<span style="color: #000000; font-weight: bold;">&gt;</span>
ExpiresActive on
ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>gif <span style="color: #ff0000;">&quot;access plus 1 month&quot;</span>
ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>jpeg <span style="color: #ff0000;">&quot;access plus 1 month&quot;</span>
ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>png <span style="color: #ff0000;">&quot;access plus 1 month&quot;</span>
ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>css <span style="color: #ff0000;">&quot;access plus 1 month&quot;</span>
ExpiresByType application<span style="color: #000000; font-weight: bold;">/</span>x-javascript <span style="color: #ff0000;">&quot;access plus 1 month&quot;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>I&#8217;m using 1 month expiration dates, but Yahoo is suggesting 10 years. You might want to pick something that suits your specific needs. By its nature having the expires tag should in turn reduce your browser&#8217;s HTTP requests, thereby improving your score on Rule #1 of&nbsp;Making fewer HTTP requests.</p>
<h3>Rule #13 Configure ETags</h3>
<p>Another point to touch up on is the Etags required in Rule #13. YSlow is complaining about Etags because of a known problem with the way Etags are <a href="http://david.weekly.org/writings/etags.php3">written</a> if you have a clustered server network. If your site is served off of one server this ETags score is pretty much useless. Etags is basically a string that <a href="http://httpd.apache.org/docs/1.3/mod/core.html#fileetag">Apache</a> slaps on as a response header. By default this string is composed of 3 parts. </p>
<ol>
<li>The file&#8217;s last modification date
<li>its current size
<li>its Unix inode</li>
</ol>
<p>The problem is that with multiple server environments, your inodes are going to be unique and different for each server. So if you have a banner.gif on 12 servers, it will have 12 different Etags, therefore making the whole thing useless. YSlow suggests to remove Etags all together using the directive :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">FileETag none</pre></div></div>

<p>This seems to be the norm for most big portals such as Google and Yahoo these days. This way you not only reduce the complexity, but also reduce the HTTP response headers flying around. If you really want to use Etags you can remove the inode from the Etags string by using this directive which will only use the modified time and size of the file:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">FileETag MTime Size</pre></div></div>

<p>So in my case I have 3 files that have Etags that I have no control over, since they are external stats files and I would think that eventually these people would use YSlow and fix their FileEtag directives accordingly.</p>
<ul style="color:#f00;font-size:11px;list-style-type:none;margin:0;padding:0;">These components have an ETag:
<li><img title="HTTP headers" height="10" src="http://us.i1.yimg.com/us.yimg.com/i/rt/yslow/magnify.gif" width="11" border="0"> http://edge.quantserve.com/quant.js</li>
<li><img title="HTTP headers" height="10" src="http://us.i1.yimg.com/us.yimg.com/i/rt/yslow/magnify.gif" width="11" border="0"> http://stats.wordpress.com/e-200730.js</li>
</ul>
<h3>Rule # 12. Remove duplicate scripts</h3>
<p>YSlow noticed that the <a href="http://pagead2.googlesyndication.com/pagead/show_ads.js">show_ads.js</a> from Google&#8217;s AdSense program is loaded twice on this page. I&#8217;m currently using the terrific WordPress plugin <a href="http://www.mutube.com/projects/wordpress/adsense-manager/">AdSense Manager</a> which interestingly enough seems to be putting in the JS tag once for each ad on the page. I&#8217;m not sure if this is something that might be required by Google. I would be interested in finding out if I can change the plugin to include the AdSense script file only once which would make more &#8220;sense&#8221; without leading to potential side effects on Google&#8217;s side of things.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/performance/yslow-review-the-firebug-addon.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Sender Policy Framework and DNS</title>
		<link>http://www.seifi.org/email/sender_policy_framework_and_dns.html</link>
		<comments>http://www.seifi.org/email/sender_policy_framework_and_dns.html#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>Joe Seifi</dc:creator>
				<category><![CDATA[email]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Recently I was made aware by some friends that emails I was sending to their <a href="http://mail.google.com">Gmail</a> accounts were never delivered. After days of freaking out and trying to find the problem I think I have finally fixed the problem. So it turns out that I had to publish my <a href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">SPF</a> entries.

SPF (Sender Policy Framework, aka Sender Permitted From) is an email protocol used by many ISPs and aparently now by Gmail that basically tries to identify spoofed addresses. It is used as part of a series of other tests to sort out spam. Basically it adds a <code>Return-Path:</code> header to outgoing emails. This is then read by the receiving servers to identify whether the sender is really who she says he is.

There is a very easy to use <a href="http://spf.pobox.com/wizard.html">SPF Wizard</a> which creates a one line record that you add to your DNS zone. For example an SPF record might look like: <code>example.com IN TXT "v=spf1 ~all"</code>

For more detailed information on SPF I would recommend reading about how <a href="http://www.wilsonweb.com/wmtp8/spf_howto.htm">SPF Helps Legitimate E-Mail Get through Spam Filters</a> and also the <a href="http://spf.pobox.com/faq.html">FAQ</a> section on SPF at POBox.]]></description>
			<content:encoded><![CDATA[<p>Recently I was made aware by some friends that emails I was sending to their <a href="http://mail.google.com">Gmail</a> accounts were never delivered. After days of freaking out and trying to find the problem I think I have finally fixed the problem. So it turns out that I had to publish my <a href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">SPF</a> entries.</p>
<p>SPF (Sender Policy Framework, aka Sender Permitted From) is an email protocol used by many ISPs and aparently now by Gmail that basically tries to identify spoofed addresses. It is used as part of a series of other tests to sort out spam. Basically it adds a <code>Return-Path:</code> header to outgoing emails. This is then read by the receiving servers to identify whether the sender is really who she says he is.</p>
<p>There is a very easy to use <a href="http://spf.pobox.com/wizard.html">SPF Wizard</a> which creates a one line record that you add to your DNS zone. For example an SPF record might look like: <code>example.com IN TXT "v=spf1 ~all"</code></p>
<p>For more detailed information on SPF I would recommend reading about how <a href="http://www.wilsonweb.com/wmtp8/spf_howto.htm">SPF Helps Legitimate E-Mail Get through Spam Filters</a> and also the <a href="http://spf.pobox.com/faq.html">FAQ</a> section on SPF at POBox.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.seifi.org/email/sender_policy_framework_and_dns.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.004 seconds -->
