<?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>Webmonkey &#187; Backend</title>
    <atom:link href="http://www.webmonkey.com/category/backend/feed/" rel="self" type="application/rss+xml" />
    <link>http://www.webmonkey.com</link>
    <description>The Web Developer&#039;s Resource</description>
    <lastBuildDate>Fri, 05 Apr 2013 20:20:46 +0000</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <generator>http://wordpress.org/?v=3.4.2</generator>
    
    <item>
        <title>We Should Retire Aaron&#8217;s Number</title>
        <link>http://www.webmonkey.com/2013/01/we-should-retire-aarons-number/</link>
        <comments>http://www.webmonkey.com/2013/01/we-should-retire-aarons-number/#comments</comments>
        <pubDate>Wed, 16 Jan 2013 15:15:38 +0000</pubDate>

                <dc:creator>Dave Winer</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60600</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Identity]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[DNS]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_.jpg" alt="We Should Retire Aaron&#8217;s Number" /></div>Last week the web lost coder and activist Aaron Swartz, but his website lives on. For now. Developer Dave Winer wants to make sure that Aaron's site lives on forever. Winer believes that one way to do that is to "retire" the URL so that the content will last as long as the web does. Sadly, there's currently no way to do that.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_60601" class="wp-caption aligncenter" style="width: 590px"><a href="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_.jpg"><img src="http://www.webmonkey.com/wp-content/uploads/2013/01/Aaron_Swartz_at_Boston_Wikipedia_Meetup_2009-08-18_.jpg" alt="" title="Aaron_Swartz_at_Boston_Wikipedia_Meetup,_2009-08-18_" width="580" height="464" class="size-full wp-image-60601" /></a><p class="wp-caption-text">Aaron Swartz. <em>Image: <a href="https://commons.wikimedia.org/wiki/File:Aaron_Swartz_at_Boston_Wikipedia_Meetup,_2009-08-18_.jpg">Wikimedia Commons</a></em>.</p></div></p>
<p>[<em>Editor's Note: Coder and activist Aaron Swartz committed suicide Jan. 11, 2013 in New York. He was 26 years old. See Wired's <a href="http://www.wired.com/threatlevel/2013/01/aaron-swartz/">early coverage</a> for details.</em>]</p>
<p>When a great <a href="http://en.wikipedia.org/wiki/List_of_Major_League_Baseball_retired_numbers">baseball</a> or <a href="http://en.wikipedia.org/wiki/List_of_National_Basketball_Association_retired_jersey_numbers">basketball</a> player leaves the game they <a href="http://en.wikipedia.org/wiki/Retired_number">retire</a> his or her number. That means the jersey hangs from the ceiling, or there&#8217;s a plaque at the stadium, and no player on the team ever wears that number again.</p>
<p><a href="https://en.wikipedia.org/wiki/Babe_Ruth">Babe Ruth&#8217;s</a> number, 3, is retired. <a href="http://en.wikipedia.org/wiki/Michael_Jordan">Michael Jordan&#8217;s</a> too (23). Jackie Robinson&#8217;s <a href="http://en.wikipedia.org/wiki/List_of_Major_League_Baseball_retired_numbers#Number_retired_by_Major_League_Baseball">number</a>, 42, is retired for all baseball teams.</p>
<p>On the web, retiring a number would mean the website is permanently registered, and the content is preserved so it lasts as long as the web does. That means the contents of <a href="http://www.aaronsw.com/">aaronsw.com</a> will be there forever. It will never become a porn site, or a landing page, or whatever.</p>
<p>Right now there is no way to do this. Isn&#8217;t that strange. We could fix it if we want. The internet is just software. It would be a small but worthwhile hack and could set a precedent for future memorials.</p>
<p>Something to think about!</p>
<p><em>This post first appeared on <a href="http://threads2.scripting.com/2013/january/weShouldRetireAaronsNumber">Scripting News</a>. Also see the <a href="http://news.ycombinator.com/item?id=5064923">related thread on Hacker News</a></em>.</p>
<div class="bio"><a href="http://www.wired.com/epicenter/author/Dave"><img src="http://www.wired.com/images/1x1.trans.gif" data-lazy-src="http://www.wired.com/epicenter/wp-content/gallery/biopics/dave_winer.jpg" alt="" /><noscript><img src="http://www.wired.com/epicenter/wp-content/gallery/biopics/dave_winer.jpg" alt="" /></noscript></a><a href="http://worldoutline.scripting.com/blogroll/aboutTheAuthor">Dave Winer</a>, a former researcher at NYU and Harvard, pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software. A former contributing editor at <em>Wired</em> magazine, Dave won the Wired Tech Renegade award in 2001.<br /> Follow <a href="http://www.twitter.com/davewiner">@davewiner</a> on Twitter.</div>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/01/we-should-retire-aarons-number/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Host Your Static Website on Amazon S3, No WWW Necessary</title>
        <link>http://www.webmonkey.com/2013/01/host-your-static-website-on-amazon-s3-no-www-necessary/</link>
        <comments>http://www.webmonkey.com/2013/01/host-your-static-website-on-amazon-s3-no-www-necessary/#comments</comments>
        <pubDate>Thu, 03 Jan 2013 16:24:41 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60424</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[amazon s3]]></category>
        <description><![CDATA[Amazon's S3 file hosting service has long been a cheap, easy way to publish static websites, but now it's even more appealing thanks to support for root domains. Amazon's documentation can be a bit confusing, but fear not, we'll show you how to get your custom domain up and running in no time.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2011/02/aws.gif" />Amazon&#8217;s S3 file storage service started life as just that &#8212; a simple way to store static files and pay for only the data you used. When you don&#8217;t need an always-on server, S3 fits the bill. </p>
<p>But if you can store static files, why not whole static websites? In 2011 Amazon began allowing you to point your own domain to an S3 &#8220;bucket&#8221;, a folder in Amazon parlance. Custom domain support made it simple to <a href="http://www.webmonkey.com/2011/02/amazon-s3-storage-now-handles-entire-websites/">host entire static sites</a>; the catch was that you needed to use a subdomain &#8212; for example, www.</p>
<p>Now <a href="http://aws.typepad.com/aws/2012/12/root-domain-website-hosting-for-amazon-s3.html">the www restriction has been lifted</a> and you can point any root domain at S3 and serve your files directly. The only catch is that Amazon has created its own non-standard DNS workaround, which means you must use Amazon&#8217;s Route 53 service to host the DNS data for your domain.</p>
<p>Unfortunately, while the new root domain support is great news for anyone using a static blog generator like <a href="http://jekyllrb.com/">Jekyll</a>, Amazon&#8217;s <a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html">documentation</a> leaves much to be desired. To help you get started with S3 hosting, here&#8217;s a quick guide to setting up S3 to serve files from a root domain (rather than making the root domain redirect to www.mydomain.com, as the <a href="http://aws.typepad.com/aws/2012/12/root-domain-website-hosting-for-amazon-s3.html">Amazon blog post instructions</a> do).</p>
<p>First, register a domain name and point your DNS records to Amazon&#8217;s Route 53 service (the Route 53 docs have <a href="http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/R53Example.html">detailed instructions</a> on how to do this). The next step is to create an S3 bucket for your domain. In other words, a bucket named mydomain.com. </p>
<p>Now click the Properties button, select the Website tab and make sure that the option is enabled and the Index Document is set to index.html. You&#8217;ll also need to click the Permissions tab and set a bucket policy (you can use this <a href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/WebsiteAccessPermissionsReqd.html">basic example</a> from Amazon).</p>
<p>Now upload your site to that bucket and head back to Route 53. Here comes the magic. To make this work you need to create an A &#8220;Alias&#8221; DNS record. Make sure you name it the same as your domain name. Sticking with the earlier example, that would be mydomain.com. Now click the Alias Target field and select the S3 endpoint you created earlier when you set up the bucket. </p>
<p>And that&#8217;s it. Behind the scenes that Route 53 &#8220;Alias&#8221; record looks like a normal DNS A record. That means things like email will continue to work for your domain and at the same time Route 53 directs requests to your S3 bucket. If you want to make www redirect to the root domain you can either set that up through Route 53 (see <a href="http://aws.typepad.com/aws/2012/12/root-domain-website-hosting-for-amazon-s3.html">Amazon&#8217;s instructions</a>) or handle it through another service.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2013/01/host-your-static-website-on-amazon-s3-no-www-necessary/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Google Drive&#8217;s New &#8216;Site Publishing&#8217; Takes on Amazon, Dropbox</title>
        <link>http://www.webmonkey.com/2012/11/google-drives-new-site-publishing-takes-on-amazon-dropbox/</link>
        <comments>http://www.webmonkey.com/2012/11/google-drives-new-site-publishing-takes-on-amazon-dropbox/#comments</comments>
        <pubDate>Thu, 29 Nov 2012 20:18:45 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=60127</guid>
        		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[amazon s3]]></category>
		<category><![CDATA[dropbox]]></category>
		<category><![CDATA[google drive]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/11/gdrivesite-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/11/gdrivesite.jpg" alt="Google Drive&#8217;s New &#8216;Site Publishing&#8217; Takes on Amazon, Dropbox" /></div>Google Drive can now host entire websites if you don't mind serving them from a long, confusing URL. Google Drive's new "site publishing" tools make it easy for app developers to upload files to Drive and then serve those files on the web.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_60128" class="wp-caption aligncenter" style="width: 590px"><img src="http://www.webmonkey.com/wp-content/uploads/2012/11/gdrivesite.jpg" alt="" title="gdrivesite" width="580" height="315" class="size-full wp-image-60128" /><p class="wp-caption-text">Google&#8217;s demo site, served entirely by Google Drive. <em>Image: Screenshot/Webmonkey</em></p></div></p>
<p>Google has unveiled a new feature dubbed &#8220;<a href="http://googleappsdeveloper.blogspot.nl/2012/11/announcing-google-drive-site-publishing.html">site publishing</a>&#8221; for the company&#8217;s Drive cloud hosting service. Drive&#8217;s new site publishing is somewhere between a full-featured static file hosting service like Amazon S3 and Dropbox&#8217;s public folders, which can make hosted files available on the web.</p>
<p>Google has set up a simple <a href="https://googledrive.com/host/0B716ywBKT84AcHZfMWgtNk5aeXM/">demo site</a> served entirely from Google Drive to give you an idea of what&#8217;s possible with the site publishing feature. Essentially site publishing gives your public folders a URL on the web &#8212; anything you drop in that folder can then be referenced relative to the root URL. It&#8217;s unclear from the announcement how these new features fit with Google&#8217;s existing answer to Amazon S3, Google Cloud Storage. </p>
<p>The API behind site publishing works a lot like what you&#8217;ll find in Amazon&#8217;s S3 offering. If you use the Drive API&#8217;s <code>files.insert</code> method to upload a file to Drive, it will return a <code>webViewLink</code> attribute, something like <code>https://googledrive.com/host/A1B2C3D4E5F6G7H8J</code>. That ugly, but functional URL becomes the base URL for your content. So, if you uploaded a folder named <code>images</code>, with a file named <code>kittens.jpg</code>, you could access it on the web at <code>https://googledrive.com/host/A1B2C3D4E5F6G7H8J/images/kittens.jpg</code></p>
<p>There&#8217;s one drawback though, Drive&#8217;s site publishing doesn&#8217;t appear to support custom domains, which means it works fine for assets like images, CSS or JavaScript, but unless you don&#8217;t mind serving your site from some funky URLs, it&#8217;s probably not the best choice for hosting an entire site.</p>
<p>There are already numerous static file hosting solutions on the web including Dropbox and Amazon&#8217;s S3, as well as whole publishing systems that use Dropbox and S3 to host files, but for those who would prefer a Google-based solution, now you have it.</p>
<p>For more details on the new API see the <a href="http://googleappsdeveloper.blogspot.nl/2012/11/announcing-google-drive-site-publishing.html">Google Apps Developer Blog</a> and be sure to read through the <a href="https://developers.google.com/drive/publish-site">Drive SDK docs</a>. If you need help, Google is answering questions over on <a href="http://stackoverflow.com/questions/tagged/google-drive-sdk">Stack Overflow</a>.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/11/google-drives-new-site-publishing-takes-on-amazon-dropbox/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Behind the Scenes at Instagram: Tools for Building Reliable Web Services</title>
        <link>http://www.webmonkey.com/2012/04/behind-the-scenes-at-instagram-tools-for-building-reliable-web-services/</link>
        <comments>http://www.webmonkey.com/2012/04/behind-the-scenes-at-instagram-tools-for-building-reliable-web-services/#comments</comments>
        <pubDate>Tue, 10 Apr 2012 16:58:59 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=55514</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Instagram]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/04/Instagram_logo-200x100.png" type="image/png" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/04/Instagram_logo.png" alt="Behind the Scenes at Instagram: Tools for Building Reliable Web Services" /></div>Want to build a web service that sells for a cool billion dollars? Instagram's developers have some advice for you: Choose your tools wisely.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><img class="aligncenter size-full wp-image-55519" title="Instagram_logo" src="http://www.webmonkey.com/wp-content/uploads/2012/04/Instagram_logo.png" alt="" width="200" height="200" />In case you missed it, yesterday <a href="http://www.wired.com/epicenter/2012/04/facebook-buys-instagram/">Facebook acquired Instagram</a>, a photo-sharing service with some 30 million users and hundreds of millions of images on its servers.</p>
<p>The reported sale price of one billion dollars no doubt has many developers dreaming of riches, but how do you build a service and scale it to the size and success of Instagram? At least part of the answer lies in choosing your tools wisely.</p>
<p>Fortunately for outside developers, Instagram&#8217;s devs have been documenting the tools they used all along. The company&#8217;s <a href="http://instagram-engineering.tumblr.com/">engineering blog</a> <a href="http://instagram-engineering.tumblr.com/post/13649370142/what-powers-instagram-hundreds-of-instances-dozens-of">outlined its development stack</a> last year and has further detailed <a href="http://instagram-engineering.tumblr.com/post/12202313862/storing-hundreds-of-millions-of-simple-key-value-pairs">how it uses</a> several of the tools it&#8217;s chosen.</p>
<p>Instagram uses an interesting mashup of tried-and-true technologies alongside more cutting-edge tools, mixing SQL databases with NoSQL tools like Redis, and chosing to host its traditional Ubuntu servers in Amazon&#8217;s cloud.</p>
<p>In a blog post last year Instagram <a href="http://instagram-engineering.tumblr.com/post/13649370142/what-powers-instagram-hundreds-of-instances-dozens-of">outlined its core principles</a> when it comes to chosing tools, writing, &#8220;keep it very simple, don&#8217;t reinvent the wheel [and] go with proven and solid technologies when you can.&#8221;</p>
<p>In other words, go with the boring stuff that just works.</p>
<p>For Instagram that means a Django-based stack that runs on Ubuntu 11.04 servers and uses PostgreSQL for storage. There are several additional layers for load balancing, push notifications, queues and other tasks, but overwhelmingly Instagram&#8217;s stack consists of stolid, proven tools.</p>
<p>Among the newer stuff is Instagram&#8217;s use of <a href="http://redis.io/">Redis</a> to store <a href="http://instagram-engineering.tumblr.com/post/12202313862/storing-hundreds-of-millions-of-simple-key-value-pairs">hundreds of millions of key-value pairs</a> for fast feeds, and <a href="http://gunicorn.org/">Gunicorn</a> instead of Apache as a web server.</p>
<p>All in all it&#8217;s a very impressive setup that has, thus far, helped Instagram avoid the down time that has plague many similar services hit with the same kind of exponential growth. (Twitter, I&#8217;m looking at you.) For more details on how Instagram looks behind the scenes and which tools the company uses, be sure to check out <a href="http://instagram-engineering.tumblr.com/post/13649370142/what-powers-instagram-hundreds-of-instances-dozens-of">the blog post</a> as well as <a href="http://instagram-engineering.tumblr.com/archive">the archives</a>.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/04/behind-the-scenes-at-instagram-tools-for-building-reliable-web-services/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Microsoft Unveils New Plan to Speed Up the Web</title>
        <link>http://www.webmonkey.com/2012/03/microsoft-unveils-new-plan-to-speed-up-the-web/</link>
        <comments>http://www.webmonkey.com/2012/03/microsoft-unveils-new-plan-to-speed-up-the-web/#comments</comments>
        <pubDate>Tue, 27 Mar 2012 15:58:58 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=55227</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[SPDY]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/03/streaking_by_theogeo_flickrcc-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/streaking_by_theogeo_flickrcc.jpg" alt="Microsoft Unveils New Plan to Speed Up the Web" /></div>First Google proposed the SPDY protocol for a "speedier" web. Now Microsoft wants in on the fun. The company has proposed an alternative to the SPDY protocol which it calls HTTP Speed+Mobility. The details of Microsoft's plan are still unclear, but with two brain trusts now contributing maybe we'll get a faster internet sooner rather than later.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><div id="attachment_55229" class="wp-caption alignleft" style="width: 290px"><a href="http://www.flickr.com/photos/theogeo/3605733189/in/photostream/"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/streaking_by_theogeo_flickrcc.jpg" alt="" title="streaking_by_theogeo_flickrcc" width="280" height="312" class="size-full wp-image-55229" /></a><p class="wp-caption-text">Photo: <a href='http://www.flickr.com/photos/theogeo/3605733189/in/photostream/'>Lindsey Turner</a>/Flickr</p></div>Microsoft wants in on the drive to speed up the web. The company plans to submit its proposal for a faster internet protocol to the standards body charged with creating HTTP 2.0.</p>
<p>Not coincidentally, that standards body, the Internet Engineering Task Force (IETF), is meeting this week to discuss the future of the venerable Hypertext Transfer Protocol, better known as HTTP. On the agenda is creating HTTP 2.0, a faster, modern approach to internet communication.</p>
<p>One candidate for HTTP 2.0 is Google&#8217;s <a href="http://www.webmonkey.com/2012/01/google-works-on-internet-standards-with-tcp-proposals-spdy-standardization/">SPDY protocol</a>. Pronounced &#8220;speedy,&#8221; Google&#8217;s proposal would replace the HTTP protocol &#8212; the language currently used when your browser talks to a web server. When you request a webpage or a file from a server, chances are your browser sends that request using HTTP. The server answers using HTTP, too. This is why &#8220;http&#8221; appears at the beginning of most web addresses.</p>
<p>The SPDY protocol handles all the same tasks as HTTP, but SPDY can do it all about 50 percent faster. Chrome and Firefox both support SPDY and several large sites, including Google and Twitter, are already <a href="http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/">serving pages over SPDY where possible</a>. </p>
<p>Part of the IETF&#8217;s agenda this week is to discuss the SPDY proposal, and the possibility of turning it into a standard.</p>
<p>But now Microsoft is submitting another proposal for the IETF to consider.</p>
<p>Microsoft&#8217;s new HTTP Speed+Mobility lacks a catchy name, but otherwise appears to cover much of the same territory SPDY has staked out. Though details on exactly what HTTP Speed+Mobility entails are thin, judging by the <a href="http://blogs.msdn.com/b/interoperability/archive/2012/03/26/speed-and-mobility-an-approach-for-http-2-0-to-make-mobile-apps-and-the-web-faster.aspx">blog post announcing it</a>, HTTP Speed+Mobility builds on SPDY but also includes improvements drawn from work on the HTML5 WebSockets API. The emphasis is on not just the web and web browsers, but mobile apps.</p>
<p>&#8220;We think that apps &#8212; not just browsers &#8212; should get faster,&#8221; writes Microsoft&#8217;s Jean Paoli, General Manager of Interoperability Strategy.</p>
<p>To do that, Microsoft&#8217;s HTTP Speed+Mobility &#8220;starts from both the Google SPDY protocol and the work the industry has done around WebSockets.&#8221; What&#8217;s unclear from the initial post is exactly where HTTP Speed+Mobility goes from that hybrid starting point.</p>
<p>But clearly Microsoft isn&#8217;t opposed to SPDY. &#8220;SPDY has done a great job raising awareness of web performance and taking a &#8216;clean slate&#8217; approach to improving HTTP,&#8221; writes Paoli. &#8220;The main departures from SPDY are to address the needs of mobile devices and applications.&#8221;</p>
<p>SPDY co-inventor Mike Belshe <a href="https://plus.google.com/u/0/110209787594312878744/posts/cZtdadKmue4">writes on Google+</a> that he welcomes Microsoft&#8217;s efforts and looks forward to &#8220;real-world performance metrics and open source implementations so that we can all evaluate them.&#8221;</p>
<p>Belshe also notes that Microsoft&#8217;s implication that SPDY is not optimized for mobile &#8220;is not true.&#8221; Belshe says that the available evidence suggests that developers are generally happy using SPDY in mobile apps, &#8220;but it could always be better, of course.&#8221;</p>
<p>The process of creating a faster HTTP replacement will not mean simply picking any one vendor&#8217;s protocol and standardizing it. Hopefully the IETF will take the best ideas from all sides and combine them into a single protocol that can speed up the web. The exact details &#8212; and any potential speed gains &#8212; from Microsoft&#8217;s HTTP Speed+Mobility contribution remain to be seen, but the more input the IETF gets the better HTTP 2.0 will likely be.</p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/03/microsoft-unveils-new-plan-to-speed-up-the-web/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Twitter Catches the &#8216;SPDY&#8217; Train</title>
        <link>http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/</link>
        <comments>http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/#comments</comments>
        <pubDate>Fri, 09 Mar 2012 15:49:07 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=54895</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Web Basics]]></category>
		<category><![CDATA[Web Standards]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[SPDY]]></category>
		<category><![CDATA[Twitter]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b-200x100.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b-660x527.jpg" alt="Twitter Catches the &#8216;SPDY&#8217; Train" /></div>Twitter is now serving up pages over Google's improved web protocol, making the site a bit speedier in Chrome and (soon) Firefox. Google is hoping that its SPDY protocol, pronounced "speedy," will one day speed up not just Google and Twitter, but the entire web.]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled --><div id="attachment_54918" class="wp-caption alignleft" style="width: 335px"><a href="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b.jpeg"><img src="http://www.webmonkey.com/wp-content/uploads/2012/03/385574568_cbe5fe31a7_b-300x239.jpg" alt="" title="385574568_cbe5fe31a7_b" width="325" class="alignleft size-medium wp-image-54918" /></a><p class="wp-caption-text"><em>Photo: <a href='https://secure.flickr.com/photos/dark_ghetto28/385574568/sizes/l/in/photostream/'>dark_ghetto28</a>/Flickr</em></p></div></p>
<p>Twitter has embraced Google&#8217;s vision of a faster web and is now <a href="https://twitter.com/#!/raffi/status/177616491204714497/photo/1">serving webpages over the SPDY protocol</a> to browsers that support it.</p>
<p>SPDY, pronounced &#8220;speedy,&#8221; is a replacement for the HTTP protocol &#8212; the language currently used when your browser talks to a web server. When you request a webpage or a file from a server, chances are your browser sends that request using HTTP. The server answers using HTTP, too. This is why &#8220;http&#8221; appears at the beginning of most web addresses.</p>
<p>The SPDY protocol handles all the same tasks as HTTP, but SPDY can do it all about 50 percent faster.</p>
<p>SPDY started life as a proprietary protocol at Google and worked only in the company&#8217;s Chrome web browser. SPDY has since won support elsewhere. Firefox will have <a href="http://hacks.mozilla.org/2012/02/spdy-brings-responsive-and-scalable-transport-to-firefox-11/">SPDY support</a> when version 11 hits prime time in the near future [<b>Update:</b> As Mozilla's Chris Blizzard <a href="https://twitter.com/#!/chrisblizzard/status/178228640595718144">points out</a>, SPDY is disabled by default in Firefox 11. If you're using the beta and want to give it a try, you'll need to visit about:config, search for <code>network.http.spdy.enabled</code> and set the value to true. If all goes well SPDY will be turned on by default in Firefox 13.]. Amazon also baked SPDY support into its Silk browser for the Kindle. </p>
<p>The IETF&#8217;s HTTPbis Working Group &#8212; the standards body charged with creating and maintaining the HTTP specification &#8212; is now <a href="http://tools.ietf.org/html/draft-mbelshe-httpbis-spdy-00">considering</a> <a href="http://www.webmonkey.com/2012/01/google-works-on-internet-standards-with-tcp-proposals-spdy-standardization/">adding SPDY</a> to HTTP 2.0, which will improve the speed of HTTP connections. </p>
<p>Despite the web standards backing, SPDY still has a long way to go before it&#8217;s an everyday part of the web. With only Chrome and Firefox behind it, SPDY is still only available for about <a href="http://marketshare.hitslink.com/browser-market-share.aspx?qprid=1&amp;qpcustomb=0">40 percent of desktop users</a>. But with large services like Twitter throwing their weight behind it, SPDY may well start to take the web by storm &#8212; the more websites that embrace SPDY the more likely it is that other browsers will add support for the faster protocol.</p>
<p>If you&#8217;d like to follow Twitter&#8217;s lead and get your own site serving over SPDY, check out <a href="http://calendar.perfplanet.com/2011/introducing-mod_spdy-a-spdy-module-for-the-apache-http-server/">mod_spdy</a>, a SPDY module for the Apache server (currently a beta release). </p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2012/03/twitter-catches-the-spdy-train/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>OpenDNS and Google Working with CDNs on DNS Speedup</title>
        <link>http://www.webmonkey.com/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup/</link>
        <comments>http://www.webmonkey.com/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup/#comments</comments>
        <pubDate>Wed, 31 Aug 2011 14:05:19 +0000</pubDate>

                <dc:creator>Ryan Paul - Ars Technica</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=51516</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Location]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[Web Basics]]></category>
        <description><![CDATA[A group of DNS providers and content delivery network (CDN) companies have devised a new extension to the DNS protocol that that aims to more effectively direct users to the closest CDN endpoint. Google, OpenDNS, BitGravity, EdgeCast, and CDNetworks are among the companies participating in the initiative, which they are calling the Global Internet Speedup. [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><a href="http://arstechnica.com/telecom/news/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup.ars"><img src="http://www.webmonkey.com/wp-content/uploads/2010/07/ars-technica1.jpg" /></a>A group of DNS providers and content delivery network (CDN) companies have devised a new extension to the DNS protocol that that aims to more effectively direct users to the closest CDN endpoint. Google, OpenDNS, BitGravity, EdgeCast, and CDNetworks are among the companies participating in the initiative, which they are calling the <a href="http://www.afasterinternet.com/">Global Internet Speedup</a>.</p>
<p>The new DNS protocol extension, which is documented in an IETF draft, specifies a means for including part of the user&#8217;s IP address in DNS requests so that the nameserver can more accurately pinpoint the destination that is topologically closest to the user. Ensuring that traffic is directed to CDN endpoints that are close to the user could potentially reduce latency and congestion for high-impact network services like video streaming.</p>
<p>The new protocol extension has already been implemented by <a href="http://www.opendns.com/">OpenDNS</a> and <a href="http://code.google.com/speed/public-dns/">Google&#8217;s Public DNS</a>. It works with the CDN services that have signed on to participate in the effort. Google and OpenDNS hope to make the protocol extension an official IETF standard. Other potential adopters—such as Internet ISPs—are free to implement it from the draft specification.</p>
<p>It&#8217;s not really clear in practice how much impact this will have on network performance. It&#8217;s worth noting that GeoIP lookup technology is already used by some authoritative DNS servers for location-aware routing. The new protocol extension will reportedly address some of the limitations of previous approaches.</p>
<p><em>This article originally appeared on <a href="http://www.arstechnica.com/">Ars Technica</a>, Wired&#8217;s sister site for in-depth technology news.</em></p>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2011/08/opendns-and-google-working-with-cdns-on-dns-speedup/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    
    <item>
        <title>Google&#8217;s New Cloud Storage Service Takes on Amazon S3</title>
        <link>http://www.webmonkey.com/2010/05/googles-new-cloud-storage-service-takes-on-amazon-s3/</link>
        <comments>http://www.webmonkey.com/2010/05/googles-new-cloud-storage-service-takes-on-amazon-s3/#comments</comments>
        <pubDate>Thu, 20 May 2010 14:48:39 +0000</pubDate>

                <dc:creator>Scott Gilbertson</dc:creator>

        <guid isPermaLink="false">http://www.webmonkey.com/?p=47484</guid>
        		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Backend]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[Google]]></category>
            <enclosure url="http://www.webmonkey.com/wp-content/uploads/2010/05/googlecode.jpg" type="image/jpeg" length="48000" />
                    <description><![CDATA[<div class="rss_thumbnail"><img src="http://www.webmonkey.com/wp-content/uploads/2010/05/googlecode.jpg" alt="Google&#8217;s New Cloud Storage Service Takes on Amazon S3" /></div>Google plans to go head to head with Amazon&#8217;s popular S3 cloud storage service with the new Google Storage for Developers. Like S3, Google&#8217;s new service offers developers a cheap, scalable way to store data online. While it isn&#8217;t exactly the fabled &#8220;GDrive,&#8221; Google Storage for Developers certainly lays the groundwork for Google to create [...]]]></description>

            <content:encoded><![CDATA[<p><!-- wpautop enabled -->
<p><img src="http://www.webmonkey.com/wp-content/uploads/2010/05/googlecode.jpg" alt="googlecode" title="googlecode" width="170" height="69" class="alignleft size-full wp-image-47485" />Google plans to go head to head with Amazon&#8217;s popular S3 cloud storage service with the new <a href="http://code.google.com/apis/storage/">Google Storage for Developers</a>. Like S3, Google&#8217;s new service offers developers a cheap, scalable way to store data online.</p>
<p>While it isn&#8217;t exactly the fabled &#8220;<a href="http://www.webmonkey.com/2007/11/the_fabled_gdrive_may_soon_see_the_light_of_day/">GDrive</a>,&#8221; Google Storage for Developers certainly lays the groundwork for Google to create a user-friendly online storage service. </p>
<p>Google Storage for Developers offers a RESTful API, backups across multiple data centers and even has support for storing large files up to hundreds of gigabytes in size. </p>
<p><a href="http://code.google.com/apis/storage/docs/overview.html">Google Storage for Developers</a> is currently an experimental Google Labs project. For now the service is available by invitation only and limited to U.S. developers. You can head over to <a href="http://gs-signup-redirect.appspot.com/">the sign up page</a> to request an invite which will give you access to 100GB of data storage and 300GB per month of data-transfer bandwidth.</p>
<p>After your application hits those limits a pay-as-you-go scheme kicks in. The pricing is roughly analogous to Amazon&#8217;s S3 service. Google&#8217;s version will run you 17 cents per GB per month for simple storage, 10 cents per GB for uploading data and 15 to 30 cents per GB for downloads. There&#8217;s also a fee for the number of requests &#8212; $.01 per 1000 PUT, POST or LIST requests and $0.01 per 10,000 requests using GET or HEAD.</p>
<p>Unfortunately that&#8217;s just different enough from <a href="http://aws.amazon.com/s3/#pricing">Amazon&#8217;s pricing structure</a> (which decreases the per GB price as your usage goes up) that it&#8217;s hard to say which is cheaper. At first glance Amazon&#8217;s S3 service looks marginally cheaper for storage, but in the end the total cost &#8212; and which is cheaper &#8212; will vary depending on the nature of your web app and how you use either storage service.</p>
<p>Hopefully, now that there&#8217;s some competition in the cloud storage space, both services will eventually become even cheaper.</p>
<p>Google does offer some extra tools that Amazon doesn&#8217;t have &#8212; the BigQuery API and the Prediction API. </p>
<p>According the <a href="http://googlecode.blogspot.com/2010/05/bigquery-and-prediction-api-get-more.html">Google Code announcement</a>, <a href="http://code.google.com/apis/bigquery/">BigQuery</a> is designed to explore the history of your data, and the more interesting <a href="http://code.google.com/apis/predict/">Prediction API</a> gives you access to Google&#8217;s machine learning algorithms which are designed to &#8220;make your apps more intelligent.&#8221; </p>
<p>The Prediction API can help make real-time decisions &#8220;such as recommending products, assessing user sentiment from blogs and tweets, routing messages or assessing suspicious activities,&#8221; says the Google Code blog.</p>
<p>For now there is no charge for using the extra APIs, though noting that in the announcement seems to indicate that, when Google Storage for Developers moves out of Labs, there will be an additional charge.</p>
<p>Because Google Storage for Developers is a beta Labs project, you won&#8217;t want to switch from Amazon&#8217;s services just yet, but if you&#8217;d like to take Google Storage for Developers for spin, head over to the <a href="http://gs-signup-redirect.appspot.com/">sign up page</a> and request an invite.</p>
<p><strong>See Also:</strong><br/></p>
<ul>
<li><a href="http://www.webmonkey.com/2009/11/google_drops_the_price_of_online_storage__paves_the_way_for_a_cheap_cloud-based_os/">Google Cuts Online Storage Pricing, Fuels Anticipation for Cheap Cloud-Based OS</a></li>
<li><a href="http://www.webmonkey.com/2010/05/dropbox-api-lets-you-add-cloud-storage-to-your-apps/">Dropbox API Lets You Add Cloud Storage to Your Apps</a></li>
<li><a href="http://www.webmonkey.com/2007/11/the_fabled_gdrive_may_soon_see_the_light_of_day/">The Fabled GDrive May Soon See the Light of Day</a></li>
</ul>
<div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/05/googles-new-cloud-storage-service-takes-on-amazon-s3/feed/</wfw:commentRss>
        <slash:comments>11</slash:comments>

        
    </item>
    
    <item>
        <title>FTP for Beginners</title>
        <link>http://www.webmonkey.com/2010/02/ftp_for_beginners/</link>
        <comments>http://www.webmonkey.com/2010/02/ftp_for_beginners/#comments</comments>
        <pubDate>Tue, 16 Feb 2010 01:45:47 +0000</pubDate>

                <dc:creator>Webmonkey Staff</dc:creator>

        <guid isPermaLink="false">http://stag.wired.com/primate/?p=590</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wiki]]></category>
        <description><![CDATA[It was in the dark ages of the Reagan era when I logged my first encounter with the File Transfer Protocol. I was involved in some nefarious video game-trading ring of the innocently naive variety, and a friend of mine had that hot new copy of Vladivostok Putting Challenge that I wanted oh so badly. [...]]]></description>

            <content:encoded><![CDATA[<!-- wpautop disabled --><p>It was in the dark ages of the Reagan era when I logged my first encounter with the File Transfer Protocol. I was involved in some nefarious video game-trading ring of the innocently naive variety, and a friend of mine had that hot new copy of Vladivostok Putting Challenge that I wanted oh so badly. The only problem was that he lived all the way on the other side of Orange County. Being too young to drive, neither of us had access to a car, and snail mail was just too darned slow. I wanted to lay down sloping fifteen-footers and rub it in the face of the Reds today, not in a week. &#8220;No problem,&#8221; my friend assured me. &#8220;Just log in to my server and grab it with FTP.&#8221;

</p><p>&#8220;FTP? What is that?&#8221; I asked. My friend let out an <a href="http://www.imdb.com/title/tt0242423/" class="external text" title="http://www.imdb.com/title/tt0242423/" rel="nofollow">Oscar-worthy</a> sigh and gave me the quick run down of the Internet protocol that would forever transform my life.

</p><p>Last I heard, my friend is collecting Galaxie 500s in Michigan, so calling him up with your FTP questions isn&#8217;t really an option anymore. Lucky for you, I&#8217;m here to give you a holier-than-thou sigh of my own and send you down the dharma path. For those of you who are entirely new to this whole game, we&#8217;ll start with a basic primer on the most comely of acronyms.

</p><span id="more-590"></span><p><br />



</p>

<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2></div>

<ol>

<li><a href="#What_is_FTP.3F">What is FTP?</a></li>

<li><a href="#Logging_In">Logging In</a></li>

<li><a href="#Anonymous_FTP">Anonymous FTP</a></li>



<li><a href="#Check_Out_the_Logs_on_That_Server.21">Check Out the Logs on That Server!</a></li>

<li><a href="#ASCII_versus_Binary">ASCII versus Binary</a></li>

<li><a href="#Giants_Among_Clients">Giants Among Clients</a>

<ol>

<li><a href="#Windows_Clients">Windows Clients</a></li>



<li><a href="#Mac_OS_X_Clients">Mac OS X Clients</a></li>

<li><a href="#Linux_Clients">Linux Clients</a></li>

</ol>

</li>

<li><a href="#FTPing_with_the_Browser">FTPing with the Browser</a></li>

<li><a href="#Tips_.26_Advice">Tips &amp; Advice</a></li>



<li><a href="#Public_Sites_You_Can_Visit">Public Sites You Can Visit</a></li>

<li><a href="#What_you.27ll_need">What you&#8217;ll need</a></li>

<li><a href="#Steps">Steps</a></li>

<li><a href="#Alternate_methods">Alternate methods</a></li>

</ol>



</td></tr></tbody></table>

<a name="What_is_FTP.3F"></a><h3> <span class="mw-headline">What is FTP?</span></h3>

<p>FTP is short for File Transfer Protocol. A protocol is a set of rules that networked computers use to talk to one another. And FTP is the language that computers on a TCP/IP network (such as the internet) use to transfer files to and from each other.

</p><p>You&#8217;ve probably encountered FTP out there on the net already. Ever downloaded a fresh nightly build of <a href="http://www.getfirefox.com" class="external text" title="http://www.getfirefox.com" rel="nofollow">Firefox</a> or grabbed MP3s from some kid&#8217;s personal server in Sweden? Then you have probably used FTP without even knowing it. Today&#8217;s web browsers allow you to download files via FTP from within the browser window. It&#8217;s very convenient, and it&#8217;s great for those times you need to download a file or two, but the browser-download method does not offer much in the realm of flexibility. You can&#8217;t upload, force a particular transfer mode, or ask the server any questions. And don&#8217;t even get me started on the security issue. But if you are doing any sort of web development, you need all this functionality.

</p><p>The best way to pursue file transfers is with a bona fide FTP client. You use an FTP client to log into an FTP server, navigate the server&#8217;s folder structure, and exchange files. That&#8217;s pretty much all FTP clients do — unlike Web browsers, FTP clients are tailor-made for such duties. The latest full-featured web editors like <a href="http://www.adobe.com/products/dreamweaver/" class="external text" title="http://www.adobe.com/products/dreamweaver/" rel="nofollow">Dreamweaver</a> and <a href="http://www.realmacsoftware.com/rapidweaver/" class="external text" title="http://www.realmacsoftware.com/rapidweaver/" rel="nofollow">RapidWeaver</a> have FTP fuctions built-in. As far as stand-alone FTP clients go, there are literally hundreds out there. Some are free, some are more expensive than a night on the town.



</p><p>We&#8217;ll take an in-depth look at the joy of using an FTP client in the pages that follow, but first, let&#8217;s look at exactly how an FTP session works.

</p>

<a name="Logging_In"></a><h3> <span class="mw-headline">Logging In</span></h3>

<p>Connecting to an FTP server is very similar to connecting to just about any other server on the Web. When you log in to your Hotmail account or a secure shopping cart system (such as the one at Amazon.com), you have to provide a server address, a user name, and a password before you can exchange information with the server.

</p><p>Let&#8217;s take a look at an example login set for an FTP server.

</p>

<pre class="brush: js">site:ftp.fakesite.org

login:mcalore

pass:h4x0r4lyfe

port:21

</pre>

<p>The first line in the example above, the site address, is simply the address of the FTP server that I&#8217;m connecting to. The &#8220;ftp&#8221; in the prefix of the URL identifies it as an FTP server. Pretty straightforward so far. The second and third lines are my user name and password, respectively. In this particular case, I have already had the server administrator set up a login account for me on the server. Even if I didn&#8217;t have a login account, I still might be able to gain access to the server by logging in anonymously. We&#8217;ll go into that more a little later.

</p><p>The last line of the example login is the port number that I&#8217;m connecting to on the server. A port is best envisioned as a little door on the server. Most servers on the web have a multitude of such doors, each with its own purpose. Each port number is dedicated to a corresponding application on the server, and the traffic intended for an application (such as an FTP server or web server) passes through the application&#8217;s dedicated door. Each port handles a specific type of transaction between the server and client. For example, the FTP protocol is handled by ports 20 and 21 by default. HTTP (the protocol that&#8217;s used to serve web pages to a browser) requests are handled by port 80.

</p><p>Often, the port number will be attached to the end of the server&#8217;s Web address, separated by a colon, like this:

</p><p><tt>ftp.fakesite.org:21</tt>

</p><p>It isn&#8217;t important that you know <a href="http://www.iana.org/assignments/port-numbers" class="external text" title="http://www.iana.org/assignments/port-numbers" rel="nofollow">every single TCP/IP port</a> for each internet application out there, but you have to be able to recognize a port number when you see one. This becomes especially critical when you are connecting to servers that route FTP connections to other, more obscure ports.



</p><p><b>Note:</b> This quandry brings up the sometimes-confusing issue of passive FTP versus active FTP, two different modes of data transfer between a client and a server. Which one is being used depends on how the client and server firewalls are set up. Since this issue is beyond the scope of this article, I will point you to a detailed discussion of active versus passive FTP over at <a href="http://slacksite.com/other/ftp.html" class="external text" title="http://slacksite.com/other/ftp.html" rel="nofollow">Slacksite.com</a>. So don&#8217;t be alarmed if you notice that your FTP connection is jumping to port 1013 all of sudden — that&#8217;s just your data being routed via passive FTP.

</p><p><br />

</p>

<a name="Anonymous_FTP"></a><h3> <span class="mw-headline">Anonymous FTP</span></h3>

<p>Many public servers on the Internet allow users to log in and download files via FTP by connecting anonymously. This is a very common practice in the world of open-source and freely distributed software.

</p><p>When you connect anonymously to an FTP server, you&#8217;re not really anonymous in the truest sense. Most of the time, you are required to enter &#8220;anonymous&#8221; as your user name and your email address as your password. This is a gesture of courtesy toward the server administrators so that they can get some idea of who&#8217;s logging in and downloading their files. Even if you are connecting anonymously and you aren&#8217;t required to give any personal information during the connection process, any sysadmin worth her salt is logging your session. This means that if you do anything nasty or illegal, the server administrator has your number (quite literally, your host domain and IP address). You can be put on probation, blocked, or prosecuted. So, here&#8217;s a tip to remember:anonymous is never <i>really</i> anonymous as far as anonymous FTP is concerned.

</p><p><br />

</p>



<a name="Check_Out_the_Logs_on_That_Server.21"></a><h3> <span class="mw-headline">Check Out the Logs on That Server!</span></h3>

<p>Sometimes, the easiest way to wrap your head around a new concept is to dig in and examine the bare bones. In this case, we can learn a lot by simply reading the log from an FTP session.

</p><p>All FTP servers and clients will log FTP sessions. A log is basically a text record of all of the activity that goes on during a session. Your client should save your FTP logs locally, so you can open them up in a text editor and have a peek at all the nitty-gritty FTP commands and transfer hoo-hah.

</p><p>Let&#8217;s take a look at a sample FTP log. I&#8217;m logging in to my server with the user name &#8220;mcalore&#8221;. This log simply shows my client connecting to the server, logging in, and asking for the list of files inside the default directory on the server. That&#8217;s all that&#8217;s going on here!

</p>

<pre class="brush: js">Status:Connecting to ftp.fakesite.org ...

Status:Connected with ftp.fakesite.org.

Response:220 ProFTPD 1.2.4 Server (ProFTPD) [109.41.xx.xxx]

Command:USER mcalore

Response:331 Password required for mcalore.

Command:PASS **********

Response:230 User mcalore logged in.

Status:Connected

Status:Retrieving directory listing...

Command:PWD

Response:257 "/users/mcalore" is current directory.

Command:LIST

Response:150 Opening ASCII mode data connection for file list.

Response:226 Transfer complete.

Status:Directory listing successful

</pre>

<p>Starting at the beginning of the log, you can see that my FTP client wants to connect to the server at fakesite.org. My client knows that the server is active and waiting, so it sends the first command, which is &#8220;USER mcalore&#8221;. The server says, &#8220;OK, but I need a password&#8221;. My FTP client sends the next command, which is &#8220;PASS ********&#8221;. This is all pretty simple — my client sends a Command, and the server sends back a Response. The communication goes on like this during the entire session. It looks like my client and my server are becoming fast friends, eh?

</p><p>There are several commands that a client can send to an FTP server to find out information, switch directories, or request files. In the sample log above, the PWD command — which should be familiar to Unix users — is used to find out the current directory you&#8217;re working in on the server. You can view a full list of FTP commands on <a href="http://www.columbia.edu/acis/eds/data_tools/ftp-man/ftp_com.html" class="external text" title="http://www.columbia.edu/acis/eds/data_tools/ftp-man/ftp_com.html" rel="nofollow">Columbia University&#8217;s Academic Information Systems site</a>. Even though your client will take care of all the server commands for you, a good Monkey should be able to look at the logs and understand what&#8217;s going on.

</p><p>At this point, you&#8217;re just about ready to grab your own FTP client and start experimenting. However, by showing you the sample FTP log, I opened a can of worms that we haven&#8217;t discussed yet:transfer modes.

</p><p><br />

</p>

<a name="ASCII_versus_Binary"></a><h3> <span class="mw-headline">ASCII versus Binary</span></h3>



<p>Let&#8217;s go back to the last four lines of the sample log that we examined in the previous section.

</p>

<pre class="brush: js">Command:LIST

Response:150 Opening ASCII mode data connection for file list.

Response:226 Transfer complete.

Status:Directory listing successful

</pre>

<p>See that server response that reads &#8220;Opening ASCII mode data connection for file list&#8221;? That&#8217;s very important. File transfers over FTP take two different forms, ASCII and binary.

</p><p>ASCII, otherwise known as American Standard Code for Information Interchange, is a set of 128 symbols that any computer in the world can display. You may be familiar with <a href="http://blackroses.textfiles.com/" class="external text" title="http://blackroses.textfiles.com/" rel="nofollow">ASCII text</a>, <a href="http://www.ascii-art.de/" class="external text" title="http://www.ascii-art.de/" rel="nofollow">ASCII art</a>, and <a href="http://blackroses.textfiles.com/etext/" class="external text" title="http://blackroses.textfiles.com/etext/" rel="nofollow">ASCII files</a>. Any file that is made up of text or text-based components, such as an HTML file, text file, or PostScript file, is an ASCII file. Binary files, on the other hand, are structured differently, and therefore require a different style of transfer. Images, applications, and algorithmically generated packages such as .zip and .tar files are all binary file types.

</p><p>Just about every FTP client out there will automatically detect which transfer mode is required and treat your uploads and downloads accordingly. Most clients run in binary transfer mode by default, only using ASCII mode when it&#8217;s absolutely needed. This is because both ASCII and binary files can be sent in binary mode with no problems, but sending a binary file in ASCII mode will corrupt the binary file&#8217;s structure. ASCII mode makes for faster transfers, but if you accidentally upload a Microsoft Word file or JPG image in ASCII mode, your file will hit the server dead on arrival. If there&#8217;s any question, transfer in binary mode.

</p><p>Of course, we wouldn&#8217;t have such a handy rule without one exception:CGI scripts. You must use ASCII mode when sending CGI scripts. They just won&#8217;t work otherwise! Luckily, any files ending in .pl or .cgi are usually recognized as CGI scripts by your FTP client.

</p><p>Quickly, here are some guidelines:

</p><p>These file types are safe for ASCII transfer

</p>



<ul><li> Text files

</li><li> HTML files

</li><li> CGI scripts

</li></ul>

<p><br />

These file types must be transferred in binary mode

</p>

<ul><li> Images

</li><li> Applications

</li><li> .zip, .sit or .tar packages

</li><li> Proprietary file formats such as .doc, .xls, .fla, .swf



</li><li> Anything that&#8217;s not made entirely of text characters!

</li></ul>

<p><br />

Now that you possess basic knowledge of the File Transfer Protocol and its many gifts, how about digging in and actually trying out some clients? Thought I&#8217;d never ask, huh?

</p>

<a name="Giants_Among_Clients"></a><h3> <span class="mw-headline">Giants Among Clients</span></h3>

<p>Most FTP clients in the less-than-US$40 range have all of the basic features that you&#8217;ll need to become a power FTP user. Even so, it may take a short period of trial and error before you find an FTP client that you totally jive with. When choosing an FTP client, you should aim for an application which:

</p>

<ul><li> Has an easy to use interface that clearly displays both the local (your computer) and remote (the FTP server) locations

</li><li> Has a tool to manage multiple login accounts on multiple servers

</li><li> Logs your FTP sessions



</li><li> Provides a way to select between active and passive FTP when connecting

</li><li> Auto-detects or warns you when ASCII mode is required

</li><li> Allows you to set folder and file permissions on the server (essential when installing a server-side application such as <a href="http://www.movabletype.org/" class="external text" title="http://www.movabletype.org/" rel="nofollow">Movable Type</a>)

</li><li> Allows anonymous FTP

</li></ul>

<p><br />

</p>

<a name="Windows_Clients"></a><h4> <span class="mw-headline">Windows Clients</span></h4>

<p>An easy-to-use and entirely free application called <a href="http://sourceforge.net/projects/filezilla" class="external text" title="http://sourceforge.net/projects/filezilla" rel="nofollow">FileZilla</a> is a great place to start. It was created by an open source community headed by Tim Kosse, and even though the user interface is a little intimidating, FileZilla has all of the features you&#8217;ll need to get cracking.



</p><p><a href="http://www.cuteftp.com/products/cuteftp/index.asp" class="external text" title="http://www.cuteftp.com/products/cuteftp/index.asp" rel="nofollow">CuteFTP</a>, made by GlobalSCAPE, Inc., costs $40 per user license.

</p><p>Another crowd favorite in the world of Windows FTP clients is <a href="http://www.ipswitch.com/products/WS_FTP/index.html" class="external text" title="http://www.ipswitch.com/products/WS_FTP/index.html" rel="nofollow">WS_FTP Pro</a> by Ipswitch. Also $40 per user license, WS_FTP offers a clean interface and connection management tools.

</p>

<a name="Mac_OS_X_Clients"></a><h4> <span class="mw-headline">Mac OS X Clients</span></h4>

<p>If you&#8217;re using a Macintosh, most people point you toward Fetch Softworks&#8217; ever-popular <a href="http://fetchsoftworks.com/" class="external text" title="http://fetchsoftworks.com/" rel="nofollow">Fetch</a> client. It&#8217;s simple, it&#8217;s easy, and it costs $25 per user license.

</p><p>A personal favorite client for the Mac is Panic&#8217;s <a href="http://www.panic.com/transmit/" class="external text" title="http://www.panic.com/transmit/" rel="nofollow">Transmit</a>. It has the cleanest user experience I&#8217;ve ever encountered in an FTP client. Transmit costs $24.95 per user license.



</p><p>An excellent free FTP client for Mac OS X is <a href="http://rsug.itd.umich.edu/software/fugu/" class="external text" title="http://rsug.itd.umich.edu/software/fugu/" rel="nofollow">Fugu</a>. The user interface is a tad spare, but Fugu supports ultra-secure OpenSSH <a href="http://kb.indiana.edu/data/akqg.html?cust=582040.59241.131" class="external text" title="http://kb.indiana.edu/data/akqg.html?cust=582040.59241.131" rel="nofollow">SFTP</a> encryption.

</p><p>The free <a href="http://filezilla-project.org/download.php?type=client" class="external text" title="http://filezilla-project.org/download.php?type=client" rel="nofollow">FileZilla</a> client is also available for the Mac.

</p>

<a name="Linux_Clients"></a><h4> <span class="mw-headline">Linux Clients</span></h4>

<p>Linux users who want to try FileZilla can grab it through their system&#8217;s package manager or compile it themselves using <a href="http://filezilla-project.org/download.php?type=client" class="external text" title="http://filezilla-project.org/download.php?type=client" rel="nofollow">source code</a>.



</p><p><br />

</p>

<a name="FTPing_with_the_Browser"></a><h3> <span class="mw-headline">FTPing with the Browser</span></h3>

<p>As we have seen, the best way to run FTP is through a real FTP client. However sometimes it&#8217;s just plain easier to grab files off an FTP server using a web browser. As you&#8217;ll notice, when a browser is pointed to an FTP server instead of a web server, the http:// in the address field changes to ftp:// since you&#8217;re working with a different protocol, after all. Your browser&#8217;s address field will look something like this:

</p><p><tt><a href="ftp://username:password@ftp.fakesite.org/" class="external free" title="ftp://username:password@ftp.fakesite.org/" rel="nofollow">ftp://username:password@ftp.fakesite.org/</a></tt>

</p><p>When using a browser to connect to an FTP server, you may be asked to log in just like you would if you were connecting with an FTP client. Once inside the server, your user name and the password you give will be reflected in the server path, as shown above. If you logged in anonymously, your username would show up as the word &#8220;anonymous&#8221; and your email address would serve as the password. Most browsers are set to log into FTP servers anonymously by default.

</p><p>A web browser can navigate an FTP server much like any other file system. You can click on folder&#8217;s name to browse that particular folder and click on files to download them. But even though browser FTPing is nice an convenient, as a general rule use an FTP client whenever possible. Browsers offer minimal functionality and, not surprisingly, <a href="http://support.microsoft.com/support/kb/articles/Q135/9/75.asp?LNG=ENG&amp;SA=DA&amp;FR=1" class="external text" title="http://support.microsoft.com/support/kb/articles/Q135/9/75.asp?LNG=ENG&amp;SA=DA&amp;FR=1" rel="nofollow">minimal security</a> in FTP mode.

</p>

<a name="Tips_.26_Advice"></a><h3> <span class="mw-headline">Tips &amp; Advice</span></h3>



<p><b>Be courteous.</b> The people that run public FTP servers are just that:people. They don&#8217;t like being hassled by impolite users, or even innocents who haven&#8217;t learned how to properly use their FTP clients. Many FTP admins place readme files in the root directory of their server (&#8220;root directory&#8221; being the main directory you&#8217;re dropped into when you log in). The readmes aren&#8217;t there to take up space or look pretty, they are there for you to read. Also, administrators sometimes put their user guidelines in the flood of server information that you receive when you first log in. Open up your FTP logs and browse them for rules, requests concerning your behavior, and the sysadmin&#8217;s contact info in case anything goes wrong.

</p><p><b>Be patient.</b> Some servers are extremely popular, so it may take you a few tries to gain access. If your client allows you to re-try logging in after a server timeout, all the better. Set your re-tries to one minute or longer, and don&#8217;t hammer the FTP server with log in requests. That&#8217;s an excellent way to have your IP address banned.

</p><p><b>Find the Pub</b> Once you&#8217;ve connected to a strange server for the first time, you may have trouble accessing certain folders. That&#8217;s because permissions have been set that only allow certain users to get into folders where sensitive files are stored. Unless the readme files point you elsewhere, your best bet is to aim for /PUB, the standard public directory on Unix systems. If you are downloading anything for public use off of a public FTP server, that&#8217;s where you&#8217;ll find it.

</p>

<a name="Public_Sites_You_Can_Visit"></a><h3> <span class="mw-headline">Public Sites You Can Visit</span></h3>

<p>Speaking of public FTP servers, I have a few favorites that I&#8217;d like to pass along. There&#8217;s some wonderful software available on the <a href="http://www.gnu.org/order/ftp.html" class="external text" title="http://www.gnu.org/order/ftp.html" rel="nofollow">Free Software Foundation</a> servers. You can download academic Linux builds from the <a href="http://www.mirrorservice.org/" class="external text" title="http://www.mirrorservice.org/" rel="nofollow">UK Mirror Service</a>, or find out when your Uncle Jeb emigrated to West Virginia by scrounging up <a href="ftp://ftp.rootsweb.com/pub/" class="external text" title="ftp://ftp.rootsweb.com/pub/" rel="nofollow">genealogical data</a>. If you have a spare <a href="http://en.wikipedia.org/wiki/SGI_Visual_Workstation" class="external text" title="http://en.wikipedia.org/wiki/SGI_Visual_Workstation" rel="nofollow">SGI machine</a> lying around that needs some software, the University of California at Santa Cruz has its own <a href="http://mambo.ucsc.edu/psl/sgiftp.html" class="external text" title="http://mambo.ucsc.edu/psl/sgiftp.html" rel="nofollow">directory</a> of FTP sites carrying public domain software. If your girlfriend is an astronomy buff like mine, go grab some <a href="http://seds.lpl.arizona.edu/pub/faq/astroftp.html" class="external text" title="http://seds.lpl.arizona.edu/pub/faq/astroftp.html" rel="nofollow">space research materials</a> and impress her with your Carl Sagan impersonation.



</p><p>The world of FTP has <a href="http://www.alt-usage-english.org/excerpts/fxbillio.html" class="external text" title="http://www.alt-usage-english.org/excerpts/fxbillio.html" rel="nofollow">billions and billions</a> of practical applications, and now you&#8217;re ready to start exploring. Why the blank stares? C&#8217;mon, this is the kind of stuff I do for fun. Seriously!

</p><div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/02/ftp_for_beginners/feed/</wfw:commentRss>
        <slash:comments>2</slash:comments>

        
    </item>
    
    <item>
        <title>Site Optimization Tutorial &#8211; Lesson 1</title>
        <link>http://www.webmonkey.com/2010/02/site_optimization_tutorial_-_lesson_1/</link>
        <comments>http://www.webmonkey.com/2010/02/site_optimization_tutorial_-_lesson_1/#comments</comments>
        <pubDate>Tue, 16 Feb 2010 01:45:47 +0000</pubDate>

                <dc:creator>Webmonkey Staff</dc:creator>

        <guid isPermaLink="false">http://stag.wired.com/primate/?p=641</guid>
        		<category><![CDATA[Backend]]></category>
		<category><![CDATA[UI/UX]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[wiki]]></category>
        <description><![CDATA[A picture&#8217;s worth a thousand words. An old saying, but true enough on the web where you can transfer chapters of text in the time it takes to download just one big image. Ever notice how pictures are always the last thing to show up when you&#8217;re surfing? That&#8217;s because the biggest hunk of download [...]]]></description>

            <content:encoded><![CDATA[<!-- wpautop disabled --><p>A picture&#8217;s worth a thousand words. An old saying, but true enough on the web where you can transfer chapters of text in the time it takes to download just one big image. Ever notice how pictures are always the last thing to show up when you&#8217;re surfing? That&#8217;s because the biggest hunk of download time comes from the image files.

</p><p>Over the next four days, we&#8217;ll be looking at all the different ways to get pages down to their leanest and meanest. Today we start with the most egregious and most obvious culprit: images.

</p><p>By the way, a lot has changed since the first edition of this tutorial &#8211; there&#8217;s more to optimizing image performance today than just knowing your GIFs from your JPEGs. (Though we&#8217;ll review that, since this may be your first time around.) There are now other file formats (like PNG) worth considering, and improved weighted-optimization techniques to throw into the mix.

</p><p>And, hey, quite a bit hasn&#8217;t changed. For one, web users haven&#8217;t gotten any more patient. It doesn&#8217;t matter how ice-cool your images may look &#8211; if they can&#8217;t be downloaded quickly over a 56K modem, very few people without broadband will stick around to see them.

</p><p>Fortunately, there&#8217;s still a host of tricks and optimizations that web designers can implement to speed image downloads. Let&#8217;s start with the easiest thing in the world.

</p><span id="more-641"></span>

<table id="toc" class="toc" summary="Contents"><tbody><tr><td><div id="toctitle"><h2>Contents</h2> </div>



<ol>

<li><a href="#Don.27t_Need_It.3F_Don.27t_Use_It.">Don&#8217;t Need It? Don&#8217;t Use It.</a></li>

<li><a href="#Image_Formats">Image Formats</a></li>

<li><a href="#JPG_and_PNG_Basics">JPG and PNG Basics</a></li>

<li><a href="#Standard_Image_Compression">Standard Image Compression</a></li>



<li><a href="#Advanced_Compression_Techniques">Advanced Compression Techniques</span></a></li>

<li><a href="#Faster_Than_a_Speeding_Progressive_Download">Faster Than a Speeding Progressive Download</a></li>

<li><a href="#Cache_Is_Your_Friend">Cache Is Your Friend</a></li>

<li><a href="#Size_.27Em_Right">Size &#8216;Em Right</a></li>

</ol>



</td></tr></tbody></table>



<a name="Don.27t_Need_It.3F_Don.27t_Use_It."></a><h4> <span class="mw-headline">Don&#8217;t Need It? Don&#8217;t Use It.</span></h4>

<p>Nothing tricky or techie about this, but, friend, it works wonders. Before you do anything else, remove every superfluous image from your page&#8217;s design. Now &#8220;superfluous&#8221; doesn&#8217;t mean your company logo or a useful map to your office. We&#8217;re talking about that clever, animated envelope next to your Send Mail link. Or, if your site has a splash page with a big logo and a [CLICK HERE TO ENTER!] link, ditch it and send your audience directly your main page. Trust us:a fast-loading, functional website gives your business a better image than some splashy intro that offers the user no real content, and nothing to do but wait for the next page to load.

</p><p>Remember, shaving a paltry 10KB image off your site may not sound like that impressive an improvement, but if you&#8217;re working with a 40KB page, that 10 KB represents a healthy 25 percent reduction in download time not a bad trade for the loss of hi-res picture of your new Hello Kitty toaster.

</p><p>If you&#8217;re really hell bent about creating split-second page loads or you have a page that desperately needs trimming, consider axing graphical submit buttons and replacing them with text submits. They are recommended by user interface experts and users alike.

</p><p><b>Click to Submit Data</b>

</p><p>Also, you can replace animated GIFs with static images, which take a fraction of the time to download.

</p><p>Finally, a lot of fancy &#8220;header&#8221; and navigation graphics can be replaced with larger text, appropriately styled with a <font> tag or CSS. These days, this option works better than ever, because Windows XP and Mac OS X browsers natively support text anti-aliasing. This process smooths the jagged edges around fonts, giving screen type a more natural, refined look, especially at bigger font sizes.

</font></p>

<font><a name="Image_Formats"></a></font><h4><font> <span class="mw-headline">Image Formats</span></font></h4>



<p><font>Unless you&#8217;re bent on evoking that retro-fly ARCHIE or GOPHER feel, you&#8217;re probably going to be using some images on your pages. Just follow a few simple guidelines as you generate your images, and your pages will download in record time.

</font></p><p><font>To begin with, decide whether a given image ought to be a GIF, JPEG, or PNG. This may seem elementary, but it&#8217;s a mistake that&#8217;s still slowing down a good percentage of web pages out there.

</font></p><p><font>GIF is the oldest and most compatible file format for pictures on the web perfectly suited for smaller graphics that need to look crisp and clean, but don&#8217;t need more than 256 colors. GIFs can also be saved with one &#8220;transparent color,&#8221; allowing them to have irregularly shaped borders. Simple company logos, icons, and navigation buttons are good examples of graphics that should be saved in GIF format.

</font></p><p><font>Now, PNG is a lot like GIF &#8211; in fact, it was developed to be a patent-free alternative to GIF, created with the same sort of uses in mind. PNG builds on GIF&#8217;s basic features, with improvements like more colors, fancy multilevel transparency (ideal for delicate drop-shadow effects), even gamma-correction, which ensures that colors look the same on Mac, Windows, and Linux computers. Best of all, not only are PNGs just as good as GIFs in almost every way, but PNGs use better file compression so they&#8217;re smaller files which load more quickly.

</font></p><p><font>In short, PNG is an excellent substitute for GIF, built to handle the same types of graphics (logos, icons, irregularly-shaped items, et cetera) better and faster. There&#8217;s just one BIG drawback:a tiny, tiny percentage of browsers won&#8217;t display PNGs at all! And, because of this, hardly anybody uses PNGs yet.

</font></p><p><font>So should you risk stepping up to PNG just to make your pages faster? Well, probably, &#8220;Yeah!&#8221; We&#8217;ll come back to that decision, but first, let&#8217;s talk compression basics, and see how underdog PNG and old-timer GIF stack up against JPEG, the hulking file format that crushes photo-realistic data into teensy-weensy files.

</font></p>

<font><a name="JPG_and_PNG_Basics"></a></font><h4><font> <span class="mw-headline">JPG and PNG Basics</span></font></h4>

<p><font>PNGs and GIFs use a lossless compression format. Unlike a JPEG, the details of your graphic won&#8217;t get blurry. If you&#8217;re scanning something like a finely detailed map, or creating anything with small text, you should choose the GIF or PNG format. Just keep in mind that using GIFs (and even PNGs) for large pictures leads to huge file sizes and long download times.

</font></p><p><font>For example, take a look at these three images:

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_mapgif.gif" alt="siteoptimization1_mapgif.gif">

<i>12 KB GIF</i>

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_mappng.png" alt="siteoptimization1_mappng.png">

<i>13 KB PNG</i>



</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_mapjpg.jpg" alt="siteoptimization1_mapjpg.jpg">

<i>12 KB JPG</i>

</font></p><p><font>The first is a GIF, the second is a PNG, and the third is a JPEG. All three files are comparable size-wise, right around 12K. If this were a map to your office, which two formats would you consider? Right. So why use JPEGs at all, then?

</font></p><p><font>Well, take a look at these three images:

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_cactusgif.gif" alt="siteoptimization1_cactusgif.gif">

<i>49 KB GIF</i>

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_cactuspng.png" alt="siteoptimization1_cactuspng.png">

<i>44 KB PNG</i>

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_cactusjpg.jpg" alt="siteoptimization1_cactusjpg.jpg">

<i>12 KB JPG</i>

</font></p><p><font>Again, the first is a GIF. Even though it&#8217;s maxing out at 256 colors (it&#8217;s 8-bit), it looks OK, but you&#8217;ll notice that the file size is huge. The second is a picture-perfect PNG, displaying thousands of colors at once, so the shading between similar colors is really <a href="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_cactusjpg.jpg" class="external text" title="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_cactusjpg.jpg" rel="nofollow">nice and smooth</a>. But again with the big file size.



</font></p><p><font>Now the third file, a JPEG, is also using thousands of colors, and lookin&#8217; pretty good, too. And check out the small, superslim file size! See, JPEG has the advantage of &#8220;lossy&#8221; compression in which some information is actually discarded when creating the file. So while you might see some photographic details being blurred, and other tell-tale digital artifacts that are the bi-product of lossy compression, the overall image looks OK, and the file size is a fraction of what can be achieved with more accurate lossless methods.

</font></p><p><font>JPEGs are the perfect file format for color photographs on the web, whether they&#8217;re scanned or straight from the digital camera. Just keep in mind that JPEGs can&#8217;t do animation or transparency, and they don&#8217;t handle detailed drawings as well as GIFs or PNGs.

</font></p>

<font><a name="Standard_Image_Compression"></a></font><h4><font> <span class="mw-headline">Standard Image Compression</span></font></h4>

<p><font>Grab a demo of GraphicConverter, Photoshop, or Fireworks and experiment with compression. Try a bunch of different settings and see what you liked best in terms of display quality and file size.

</font></p><p><font>JPEG offers the widest range of compression levels, technically speaking, but it&#8217;s pretty intuitive: The more you compress an image, the worse it looks. Image-editing programs generally offer Low, Medium, and High options for image quality. Photoshop and Fireworks let the user twist the compression dial anywhere between levels 1 and 100. (Yes, and Nigel Tufnel would be impressed &#8211; but may we suggest a level 101?) Avoid the extremes, obviously, but determining the right level of compression on a given photograph is ultimately up to you.

</font></p><p><font>You can&#8217;t variably compress GIFs or PNGs <i>per se</i>, but you are able to reduce their color bit depth, which limits the number of colors used. To calculate the number of colors at a given bit depth, take 2 to the power of the bit depth (i.e., 8-bit color = 256 colors). The fewer the colors, the smaller the kilobyte size of the image. Say you&#8217;re building the Coca-Cola website &#8211; you can probably reduce your logo to a bit depth of 2 or 3. 2-bit color allows you a bold red and a white, but 3-bits buys you a few extra shades of each to smooth out rough edges. Speaking of extra shades, optimization pros will notice that using anti-aliased text in graphics makes it much harder to lower image bit depths. The anti-aliasing effect requires many extra colors to give text that softer look. If you must use type in your images, keeping it plain helps shrink file sizes and makes the text easier to read.

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_flowerpot4.gif" alt="siteoptimization1_flowerpot4.gif">

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_flowerpot256.gif" alt="siteoptimization1_flowerpot256.gif">

</font></p><p><font>Above: 2-bit and 8-bit versions of the same image. If you don&#8217;t need an extended range of colors, there&#8217;s no need to use higher bit depths!

</font></p>

<font><a name="Advanced_Compression_Techniques"></a></font><h4><font> <span class="mw-headline">Advanced Compression Techniques</span></font></h4>



<p><font>Even the simplest image-editing utilities let you play around with bit-depths and other compression settings. Photoshop offers a superb interface for previewing and managing compression options. Controlling color tables, dithering, and transparency while you fine-tune an image&#8217;s size is a breeze with these two titles.

</font></p><p><font>Photoshop has other options for power-users wanting better control over the image compression process. With weighted optimization, you identify important areas in your image using a masking tool, and then vary the compression settings across the image&#8217;s different regions. For example, you could apply maximum compression to the background of a candid snapshot, and apply better image quality to the people in front. Your finished product shows people&#8217;s faces without any strange-looking digital artifacts, while the unremarkable background contains evidence of higher compression settings.

</font></p><p><font>Weighted optimization works on GIFs, too. For instance, you might mark off key aspects of logo artwork, so critical image areas wouldn&#8217;t dither or have colors jump, when you began adjusting the bit depth.

</font></p><p><font>Nifty, eh? Well, to quote every self-respecting TV infomercial, &#8220;Wait! That&#8217;s not all!&#8221; There are other Ginsu-sharp tools in Photoshop&#8217;s &#8220;Save For Web&#8221; dialog. One is a blur effect for JPEGs that reduces the impact of digital artifacts &#8211; most handy, but best used with a light touch. Photoshop also lets you specify JPEGs to be formatted as &#8220;Baseline Optimized&#8221;, which is a slightly smaller format file size-wise. Disregard Photoshop&#8217;s warning that Baseline Optimized JPEGs are less compatible &#8211; they look OK in all browsers. Well, except of course for Lynx.

</font></p><p><font>&lt;nerd&gt; (Alright, alright. Since you really want to know, baseline optimized images use different quantization divisor tables and Huffman dictionaries than specified in the old-school JPEG/JFIF standard. So while optimized images may throw some image-editors and encoding software for a loop, the JPEG decoder in a web browser doesn&#8217;t care, since it parses the DQT and DHK markers to get those tables! Yeah, like, I know, how wacky is that?) &lt;/nerd&gt;

</font></p><p><font>Obviously, JPEG compression relies on extremely advanced mathematics. GIFs on the other hand&#8230;

</font></p><p><font>A GIF is just a list of colored pixels. GIF&#8217;s only attempt at compression is to abbreviate whenever same-color pixels are right next to each other horizontally. And that&#8217;s all.

</font></p><p><font>So with a row of 100 white pixels, the GIF format saves space by using an annotation along the lines of &#8220;one white, 99 more of same color&#8221;. A row of alternating black-and-white pixels, on the other hand, requires a more verbose description (&#8220;one black, one white, one black, one white&#8221;) and soaks up more space. Basically, it&#8217;s a big deal if colors change on the same horizontal line.

</font></p><p><font>Photoshop does have a &#8220;Lossiness&#8221; feature for decreasing GIF sizes, which takes advantage of GIF&#8217;s fondness for like-color clumps. Photoshop will substitute pixels here and there, and try to increase the number of same-color pixels sitting next to each other. It works okay, but not as well as it sounds; the automated results can look pretty bad, especially on the types of pixel-perfect artwork you&#8217;d want to use GIF for, anyway.

</font></p><p><font>If you&#8217;re hell-bent on optimizing a GIF&#8217;s size beyond reducing its colors, consider the compression scheme while designing it, and avoid changing colors along the horizontal axis. E.G., if you were drawing a logo with a &#8220;black-white-black-white&#8221; checker pattern in parts, consider using a solid grey instead. Don&#8217;t forget, GIF compression only takes horizontal rows into account. Ten vertical lines of white pixels occupy as much space as ten vertical lines of ten different colors.

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_badgif.gif" alt="siteoptimization1_badgif.gif">

<i>Bad GIF pattern</i>



</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_goodgif.gif" alt="siteoptimization1_goodgif.gif">

<i>Good GIF pattern</i>

</font></p><p><font>Wow! I think we finally have compression covered.

</font></p><p><font>Executed by an expert (that&#8217;s you now!), this increased control over image optimization should squeeze a few more kilobytes from each of your images, saving users seconds (and hopefully minutes) when paging through your site. That&#8217;s charitable, but remember:when a user doesn&#8217;t feel their time is being wasted, they&#8217;re liable to do just that &#8211; waste serious time. When they do it at your site, clicking link after link, that&#8217;s a good thing.

</font></p>

<font><a name="Faster_Than_a_Speeding_Progressive_Download"></a></font><h4><font> <span class="mw-headline">Faster Than a Speeding Progressive Download</span></font></h4>

<p><font>Alright. So your images are now as small and fast they can get. Let&#8217;s quickly cover one way to make them seem faster without focusing on file sizes.

</font></p><p><font>When you save images in an &#8220;Interlaced&#8221; (GIFs and PNGs) or &#8220;Progressive Loading&#8221; (JPG) format, the browser displays your pictures as fast as they can. First, they draw a rough approximation of the picture, then fill in details later. Sloppy as it sounds, this improves the user experience, because basic page elements get assembled quickly. Users can interact with the page &#8211; read your text content and such &#8211; before the loading process is completely finished.

</font></p><p><font>In the mid-90&#8242;s Paleoithic Era of the web, designers used the &#8220;lowsrc&#8221; attribute of the &lt;img&gt; tag for similar reasons. Browsers can load a super-compressed version of an image first, then load the &#8220;real&#8221; file later. The lowsrc approach &#8211; which requires downloading twice as many images &#8211; has been all but abandoned in favor of the progressive-loading technique.

</font></p><p><font>If you&#8217;re slipping into the radical optimization mindset, you&#8217;ve no doubt noticed that progressive or interlaced images are sometimes a little bigger kilobyte-wise. In this case, learn to live with it &#8211; there&#8217;s more to making a page &#8220;optimized&#8221; than just download size.

</font></p><p><font>In fact, there are 3 kinds of speed to think about on the web:



</font></p>

<ul><font><li> Download Speed

</li><li> Render Speed

</li><li> Visual Accessibility

</li></font></ul>

<p><font>A user makes the split-second decision between clicking through or heading back based upon a combination of these three types of speed. A good designer needs to find a way to balance the three elements, not unlike balancing a house of cards, to create the ideal download.

</font></p><p><font>Note that this timeline ends the first second a visitor is able to access and meaningfully interact with a page, not strictly when the page finishes rendering. In terms of user experience, rendering time is often academic.

</font></p><p><font>Knowing when a page has rendered enough to be useful (as opposed to a concrete ceiling of 10 KB or a &#8220;no more than three graphics per page&#8221; rule) gives a designer the layout latitude necessary to create a successful page. As long as users don&#8217;t ask, &#8220;Hey, how big is this page, anyway?&#8221;, the page is doing its job.

</font></p>

<font><a name="Cache_Is_Your_Friend"></a></font><h4><font> <span class="mw-headline">Cache Is Your Friend</span></font></h4>

<p><font>There&#8217;s one more important technique that&#8217;s key to boosting the perceived speed of your site. Those images that repeat throughout your site &#8211; common logos, headers, or navigation bars &#8211; don&#8217;t need to be downloaded more than once. By default, most browsers set aside a memory cache to store recently-used images in RAM and on the hard disk. If a browser recognizes the same filename, it&#8217;ll pull the image straight from the cache instead of downloading it. This provides a massive performance boost that a lot of automated timing programs don&#8217;t acknowledge. Just pull out a stopwatch and see for yourself.

</font></p><p><font>Since the client-side cache is such a useful ally, you should design pages with the browser cache in mind. For instance, if your site uses a number of different header graphics that vary only slightly (like a standard logo with various department names underneath it), try breaking up the image so that the unchanged portion (the standard logo) is stored in the cache and always loads immediately. Though you&#8217;ll still need to load a new graphic on each page (in this case, a department name), the image is smaller and therefore downloads faster.



</font></p><p><font>Browser caches are conceptually similar, but not the same thing as Network (or &#8220;Proxy&#8221;) cache, which we cover later in this Tutorial.

</font></p>

<font><a name="Size_.27Em_Right"></a></font><h4><font> <span class="mw-headline">Size &#8216;Em Right</span></font></h4>

<p><font>While your image editor is open, make sure the image is the same size (at 72 dpi) as it will appear on the web page. In your <tt>HTML</tt>, use the <tt>WIDTH</tt> and <tt>HEIGHT</tt> attributes of the <tt>&nbsp;IMAGE¢</tt> tag to restate the image&#8217;s actual dimensions. This allows the browser to lay out the rest of the page while the image is still downloading &#8211; so folks have something to read while they wait &#8211; and ensures that people surfing with &#8220;images off&#8221; will still see the page in its proper layout.



</font></p><p><font>If you&#8217;re using tables on your page, image dimensions take on a special importance since dimensionless images sometimes force browsers to clear and re-render the page. This occurs when a browser starts building the table&#8217;s structure according to the HTML-specified <tt>&lt;TABLE&gt; and &lt;TD&gt;</tt> dimensions and then, belatedly, discovers that an image lacking HTML dimensions is, in fact, too large to fit. Browsers will then re-render the table to accommodate the unwieldy image. This inefficient page rendering takes time, and it&#8217;s unpleasant for the user to see page elements move around, or disappear and reappear.

</font></p><p><font>You probably know this already, but when it comes to the WIDTH and HEIGHT attributes, the most important thing to remember is never use them to re-size or adjust the shape of graphics on your pages! Re-sizing via HTML is super-bad for two reasons. First, if you increase an image&#8217;s dimensions larger than the image&#8217;s actual size (at 72 dpi), you&#8217;ll end up with a jagged picture. Like this:

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_imagesix.gif" alt="siteoptimization1_imagesix.gif">

</font></p><p><font>Secondly, you&#8217;ll take a nasty performance hit. Using HTML to make an image appear smaller than its true size doesn&#8217;t always look as bad, but much more data gets downloaded than the browser actually needs for drawing the image, thus adding to the download time.

</font></p><p><font>Rules, of course, are made to be broken, and there is one case where it&#8217;s acceptable to fracture this rule. If you&#8217;ve been browsing Wired and Webmonkey long enough, you&#8217;ve probably seen images like this:

</font></p><p><font><img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_imageseven.gif" alt="siteoptimization1_imageseven.gif">

<img src="http://www.wired.com/wired/webmonkey/stuff/siteoptimization1_imageseven.gif" alt="siteoptimization1_imageseven.gif">

</font></p><p><font>In this case, both pictures are actually the same GIF file, so they take the exact same amount of time to download. However, the one on the right has been doubled in size via the WIDTH and HEIGHT attributes of the img tag. There isn&#8217;t any jaggedness because this image lacks any curves or diagonal lines. If you&#8217;ve got a logo or design that&#8217;s all right angles (lucky dog), you can use a super-small GIF (which downloads cheetah-quick) and then re-size it to your heart&#8217;s content in HTML &#8211; just remember to keep the dimensions proportional.

</font></p><p><font>You artsy folks out there might want to experiment with using HTML to re-size all sorts of images for creative effect (certainly the designers here at Wired used to enjoy it). Of course, only you know if the company president will care if you take the &#8220;artsy approach&#8221; with his photo.

</font></p><p><font><br />

<span id="title_name_el" class="wm_hidden_meta_class" title="Site Optimization Tutorial" style="visibility: hidden;"> <span id="page_path_el" class="wm_hidden_meta_class" title="/webmonkey/98/26/" style="visibility: hidden;"> <span id="author_el" class="wm_hidden_meta_class" title="smudge" style="visibility: hidden;"> <span id="creation_date_el" class="wm_hidden_meta_class" title="Updated 2002-12-13T24:00:00Z" style="visibility: hidden;"> </span></span></span></span>



</font></p>

<div id="series">

<div class="series_hdr"><font>Site Optimization Tutorial</font></div>

<table style="background: rgb(229, 249, 255) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" width="620">

<tbody><tr>

<td>

<p><a href="/2010/02/Site_Optimization_Tutorial" title="Tutorial:Site Optimization Tutorial"> Site Optimization Tutorial</a><br />

<strong class="selflink"> Site Optimization Tutorial &#8211; Lesson 1</strong><br />

<a href="/2010/02/Site_Optimization_Tutorial_-_Lesson_2" title="Tutorial:Site Optimization Tutorial - Lesson 2"> Site Optimization Tutorial &#8211; Lesson 2</a><br />

<a href="/2010/02/Site_Optimization_Tutorial_-_Lesson_3" title="Tutorial:Site Optimization Tutorial - Lesson 3"> Site Optimization Tutorial &#8211; Lesson 3</a><br />



<a href="/2010/02/Site_Optimization_Tutorial_-_Lesson_4" title="Tutorial:Site Optimization Tutorial - Lesson 4"> Site Optimization Tutorial &#8211; Lesson 4</a>

</p>

</td></tr></tbody></table>

</div><div id='linker_widget' class='contextly-widget'></div>]]></content:encoded>
            <wfw:commentRss>http://www.webmonkey.com/2010/02/site_optimization_tutorial_-_lesson_1/feed/</wfw:commentRss>
        <slash:comments>0</slash:comments>

        
    </item>
    </channel>
</rss>