<?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>Whimsical.Nu &#187; optimization</title>
	<atom:link href="http://whimsical.nu/tag/optimization/feed/" rel="self" type="application/rss+xml" />
	<link>http://whimsical.nu</link>
	<description>A whimsical blog by a whimsical girl with five different psyches: girl, geek, reader, writer, and gamer</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:02:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>FF: Minimizing HTTP Requests</title>
		<link>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/</link>
		<comments>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 04:00:10 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css sprites]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[http requests]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[website optimization]]></category>
		<category><![CDATA[website performance]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=273</guid>
		<description><![CDATA[As I mentioned last week, I&#8217;ll be talking about a few of my favorite techniques for making websites load faster&#8211;the rules and practices that I find interesting and intriguing as a web developer obsessed with a dash of challenge. ;) One of the best ways to speed up website performance is by reducing the number of HTTP requests the website makes &#8212; it&#8217;s the first rule in YDN&#8217;s Best Practices for Speeding up your Web Site and YSlow, which is arranged according to what technique would have the most impact on your page&#8217;s performance. This rule can be quite tedious...]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://scripts.indisguise.org/2008/08/29/ff-website-optimization/">I mentioned last week</a>, I&#8217;ll be talking about a few of my favorite techniques for making websites load faster&#8211;the rules and practices that I find interesting and intriguing as a web developer obsessed with a dash of challenge. ;)</p>
<p><strong>One of the best ways to speed up website performance is by reducing the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests the website makes</strong> &#8212; it&#8217;s the first rule in <a href="http://developer.yahoo.com/performance/rules.html">YDN&#8217;s Best Practices for Speeding up your Web Site</a> and <a href="http://developer.yahoo.com/yslow/">YSlow</a>, which is arranged according to what technique would have the most impact on your page&#8217;s performance. This rule can be quite tedious to do when optimizing a current website/layout, so the best case, really, is to start a project with this in mind.</p>
<p>The article explains it well, so I&#8217;ll just quote them (italics mine):</p>
<blockquote><p>80% of the end-user response time is spent on the front-end. <em>Most of this time is tied up in downloading all the components in the page</em>: images, stylesheets, scripts, Flash, etc. Reducing the number of components in turn reduces the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests required to render the page. This is the key to faster pages.</p></blockquote>
<p>The use of <a href="http://alistapart.com/articles/sprites"><acronym title="Cascading Style Sheets">CSS</acronym> sprites</a> has been around for quite a while now, and is the best way to reduce the number of <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests to your server. A <acronym title="Cascading Style Sheets">CSS</acronym> sprite is basically multiple images combined into one single, larger image, which is then positioned into your <acronym title="HyperText Markup Language">HTML</acronym> elements via <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
<p>Can you imagine the conversation between the browser and the server for either case?</p>
<blockquote><p><em>Browser:</em> Give me the background for the Index menu item.<br />
<em>Server:</em> Here you go, it will take around 1 second.<br />
<em>Browser:</em> While I&#8217;m getting that, can you also get me the background for the Blog menu item?<br />
<em>Server:</em> Here it is, another second for that.<br />
<em>Browser:</em> And let&#8217;s not forget the background for the About menu item, too.<br />
<em>Server:</em> Of course, here you go, you&#8217;ll get it in a second.<br />
&#8230;</p></blockquote>
<p>As opposed to when you use a <acronym title="Cascading Style Sheets">CSS</acronym> sprite for your menu items:</p>
<blockquote><p><em>Browser:</em> Give me the background image for the navigation menu items.<br />
<em>Server:</em> Here you go, it will take a bit less than 2 seconds.</p></blockquote>
<p>Short and sweet.</p>
<p>Note, however, that <em>if your visitors are predominantly dialup users, this might not be a good rule for you to follow</em> &#8212; mostly because you really can&#8217;t stuff any more data into that pipe than that pipe can handle. It <em>will</em> take longer for them to download the image, which will affect their perception of the website, as opposed to an image that gets downloaded faster and shows up on their browser faster. Remember those old-school rules about slicing header images? That&#8217;s basically rooted in that scenario: dialup can only download so much, so give them a couple <em>parts</em> of the header to download and see immediately. What’s best for your website depends on your target visitors.</p>
<p>There are a couple of <acronym title="Cascading Style Sheets">CSS</acronym> sprite tutorials and generators around:</p>
<ul>
<li><a href="http://www.csssprites.com/"><acronym title="Cascading Style Sheets">CSS</acronym> Sprites Generator</a> &#8211; a simple generator, giving the sprites in <acronym title="Portable Network Graphics">PNG</acronym> and <acronym title="Graphics Interchange Format">GIF</acronym> and giving background positions for each image</li>
<li><a href="http://spritegen.website-performance.org/">Website Performance&#8217;s <acronym title="Cascading Style Sheets">CSS</acronym> Sprite Generator</a> &#8211; contains a lot more extra configuration options for sprite generation if you want finer control, allows you to choose what image format to generate</li>
<li><a href="http://www.alistapart.com/articles/sprites">A List Apart&#8217;s <em><acronym title="Cascading Style Sheets">CSS</acronym> Sprites: Image Slicing&#8217;s Kiss of Death</em> article</a></li>
<li><a href="http://css-tricks.com/css-sprites-what-they-are-why-theyre-cool-and-how-to-use-them/"><acronym title="Cascading Style Sheets">CSS</acronym> Sprites: What They Are, Why They&#8217;re Cool, and How To Use Them</a></li>
<li><a href="http://stylemeltdown.com/2007/10/22/image-sprite-navigation-with-css/">Image Sprite Navigation With <acronym title="Cascading Style Sheets">CSS</acronym></a></li>
</ul>
<p>&#8230;to name a few. If you&#8217;re just getting started with spriting, I&#8217;d suggest you create your sprite manually in your preferred image editing application before trying one of the generators and work on something simple like navigation or lists with icons for the first few times. This should give you a better grasp of what happens with a sprite.</p>
<p>Something to keep in mind: <em>sprites will add complexity to maintaining your design.</em> Adding another image to an existing sprite, updating your <acronym title="Cascading Style Sheets">CSS</acronym> code to reflect that (and possibly impacting current <acronym title="Cascading Style Sheets">CSS</acronym> rules on other images using that same sprite) is slightly more time-consuming than just uploading a new image and a new <acronym title="Cascading Style Sheets">CSS</acronym> rule to use that single image. And of course, the more images on a single sprite, the more difficult it is to keep that image and the accompanying <acronym title="Cascading Style Sheets">CSS</acronym> rules maintainable. One of the ways to combat this is to organize sprites according to use. As opposed to one &uuml;ber-sprite containing everything and the dust on the coffee table, a sprite for navigation and a sprite for list items separately is easier to maintain and organize.</p>
<p>Good luck with minimizing your <acronym title="HyperText Transfer Protocol">HTTP</acronym> requests!</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/09/05/ff-minimizing-http-requests/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FF: Hidden data in Jpegs</title>
		<link>http://whimsical.nu/2008/07/25/ff-hidden-data-in-jpegs/</link>
		<comments>http://whimsical.nu/2008/07/25/ff-hidden-data-in-jpegs/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 00:00:52 +0000</pubDate>
		<dc:creator>Angela</dc:creator>
				<category><![CDATA[Frontend Friday]]></category>
		<category><![CDATA[Geek chick]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[jhead]]></category>
		<category><![CDATA[jpegs]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://scripts.indisguise.org/?p=228</guid>
		<description><![CDATA[We all know about EXIF data in photos we take with our digital cameras, which is one type of metadata that can be present in images. This metadata provides additional information about the picture, and for photos taken with digital cameras it can include the make of the camera, shutter speed, aperture, and various other information. There are other formats like IPTC and XMP. This metadata provides good information, but how important is that information when porting images on the web? Metadata is information enclosed in the file, hence any metadata adds to the file&#8217;s total size. This is good,...]]></description>
			<content:encoded><![CDATA[<p>We all know about EXIF data in photos we take with our digital cameras, which is one type of metadata that can be present in images. This metadata provides additional information about the picture, and for photos taken with digital cameras it can include the make of the camera, shutter speed, aperture, and various other information. There are other formats like IPTC and XMP.</p>
<p><em>This metadata provides good information, but how important is that information when porting images on the web?</em> Metadata is information enclosed in the file, hence any metadata adds to the file&#8217;s total size. This is good, except when we&#8217;re talking about, say, a preview/thumbnail metadata of a thumbnail image for your photo gallery. Redundant much?</p>
<p>I actually have been hit by this quirk&#8211;I kept wondering why my newly installed Photoshop kept giving me 100&#215;100 jpegs that were 100kb in size! (Yes, I was making <a href="http://livejournal.com/">Livejournal icons</a>.) I found out (after a week or so of confusion whenever I&#8217;d try) that I was including previews in my saved files because of a default setting. <strong>I got my 100&#215;100 jpegs down to 39kb, from 100kb+. That potentially saves me ~61kbs of bandwidth per image fetch!</strong></p>
<p>Stripping this metadata can be done via several methods. One is via the use of <a href="http://www.irfanview.com/">IrfanView</a>, which I&#8217;ve heard around, but as it&#8217;s Windows-only I haven&#8217;t tried it out. I also found <a href="http://www.sentex.ca/~mwandel/jhead/">jhead</a>, which is a free, open source program that runs on multiple platforms. It&#8217;s all command-line though, so if you like <acronym title="Graphical User Interface">GUI</acronym>, you might better stick with the former.</p>
<p>I did try out <em>jhead</em>, and I&#8217;m quite satisfied. It&#8217;s a quick, no-nonsense program which <a href="http://www.sentex.ca/~mwandel/jhead/usage.html">has a lot of capabilities</a>, but it also does the job I want quickly: remove all metadata.</p>
<p>To use <em>jhead</em>, you should download <a href="http://www.sentex.ca/~mwandel/jhead/">an appropriate release from the website</a>, save it somewhere, then open up Terminal (or the Command Prompt) and change the directory to where you downloaded <em>jhead</em>. If you&#8217;re using Linux/Unix/OSX, remember to set the executable bit if you downloaded the pre-built executable files by typing <code>chmod +x jhead</code> at the prompt.</p>
<p>For my case, I did a test with <a href="http://seasonalplume.net/wp-content/themes/greenpattern/i/pattern.jpg">a background pattern I&#8217;m using at Seasonal Plume</a>:</p>
<pre><code> $ ./jhead -purejpg stripped.jpg
Modified: stripped.jpg</code></pre>
<p>And that resulted in an image that was 8kbs smaller.</p>
<p><a href="http://whimsical.nu/wp-content/uploads/2008/07/jhead_result1.png"><img src="http://whimsical.nu/wp-content/uploads/2008/07/jhead_result1.png" alt="" title="jhead jpeg only result" width="500" height="224" class="alignnone size-full wp-image-230" /></a></p>
<p>This is a quick, painless way to help you save on bandwidth costs and have your websites load faster. I&#8217;ve recently gone through a Site Integrity Seminar at work and this is one of the things that I came away with that&#8217;s easily done to speed website performance. Given the fact that I did encounter this problem not too long ago, I hope this week&#8217;s Frontend Friday was helpful ;) and that you can use it for your own websites.</p>]]></content:encoded>
			<wfw:commentRss>http://whimsical.nu/2008/07/25/ff-hidden-data-in-jpegs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

