<?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/"
xmlns:series="http://unfoldingneurons.com/"
><channel><title>Larry Ullman &#187; JavaScript</title> <atom:link href="http://www.larryullman.com/tag/javascript/feed/" rel="self" type="application/rss+xml" /><link>http://www.larryullman.com</link> <description>Translating Geek Into English</description> <lastBuildDate>Mon, 21 May 2012 11:03:07 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Twenty Web Development Tips</title><link>http://www.larryullman.com/2009/01/27/twenty-web-development-tips/</link> <comments>http://www.larryullman.com/2009/01/27/twenty-web-development-tips/#comments</comments> <pubDate>Tue, 27 Jan 2009 14:06:20 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[blog]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[utilities]]></category> <category><![CDATA[writing]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=218</guid> <description><![CDATA[Somewhat randomly I&#8217;ve recently come across two very useful articles, each of which contains ten Web development tips. The first is at hackification, and is called Ten Web Development Tips I Wish I&#8217;d Known Two Years Ago. This seems to be a generally good blog, with lots of stuff worth reading. In this particular article, [...]]]></description> <content:encoded><![CDATA[<p>Somewhat randomly I&#8217;ve recently come across two very useful articles, each of which contains ten Web development tips. The first is at <a
href="http://www.hackification.com">hackification</a>, and is called <a
href="http://www.hackification.com/2008/11/06/ten-web-development-tips-i-wish-id-known-two-years-ago/">Ten Web Development Tips I Wish I&#8217;d Known Two Years Ago</a>. This seems to be a generally good blog, with lots of stuff worth reading. In this particular article, I also heartedly agree with the author&#8217;s suggestions that you should&#8230;</p><ul><li>Use a browser development plug-in, like Firebug and YSlow</li><li>Learn JavaScript</li></ul><p>This author also mentions using a <em>reset stylesheet</em>, something I wasn&#8217;t familiar with but is also mentioned in&#8230;</p><p>&#8230;the <a
href="http://www.yongfook.com/items/view/81/10-dirty-little-web-development-tricks">10 Dirty Little Web Development Tricks</a> article at <a
href="http://www.yongfook.com">Yongfook</a>. That author also recommends using a versioning system like SVN (to control the different versions of files as you work with them), which I feel makes more sense if you&#8217;re working on something with a team. Along with recommendations to learn the jQuery JavaScript framework and the Zend PHP framework, the author also suggests you take a break, perhaps the best piece of debugging advice that I&#8217;ve ever also given (I always include that in my books). There&#8217;s also some best-practices there related to using frameworks and MVC approaches to sites.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2009/01/27/twenty-web-development-tips/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Using Yahoo!’s YSlow: ETags and Compression</title><link>http://www.larryullman.com/2009/01/22/speeding-up-web-sites-using-yahoo-yslow-part-3/</link> <comments>http://www.larryullman.com/2009/01/22/speeding-up-web-sites-using-yahoo-yslow-part-3/#comments</comments> <pubDate>Thu, 22 Jan 2009 06:25:10 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[performance]]></category> <category><![CDATA[utilities]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=187</guid> <description><![CDATA[In two previous posts, I discussed analyzing my site using Yahoo!&#8217;s YSlow Firefox plug-in. I went through the initial test results and the steps I took to improve my score. At the end of part 2, I was left with a grade of 95 (whohoo!) but still two hurdles: ETags and sending compressed JavaScript and [...]]]></description> <content:encoded><![CDATA[<p>In two previous posts, I discussed analyzing my site using <a
href="http://developer.yahoo.com/yslow/">Yahoo!&#8217;s YSlow Firefox</a> plug-in. I went through the initial test results and the steps I took to improve my score. At the end of part 2, I was left with a grade of 95 (whohoo!) but still two hurdles: ETags and sending compressed JavaScript and CSS.<span
id="more-187"></span></p><p>New to me, and a slightly negative reflection on my site, was entity tags (<a
href="http://en.wikipedia.org/wiki/HTTP_ETag">ETags</a>). An ETag is a unique identifier for a resource. A browser (and other software) can check a resource&#8217;s ETag to know whether or not to download the resource, somewhat similar to how expiration headers are used. An ETag can be any value that represents the resource and changes when the resource changes. Commonly the server might use the <a
href="http://httpd.apache.org/docs/2.2/mod/core.html#fileetag">file&#8217;s modification time</a> for this value, or a hash representation of the file as a whole (e.g., run the file&#8217;s contents through an MD5 function). My server was providing ETags for all but the main PHP page. This makes sense, because PHP pages aren&#8217;t like static HTML pages: my main PHP page is updated whenever the database it uses for its content is updated.</p><p>One fix would be to have PHP send an ETag header:</p><pre>header("ETag: \"representative value\"");</pre><p>As already written, the representative value could be any of the following:</p><ul><li>The modification time of the last database record used by the page</li><li>An MD5 representation of the entire page, including the database-driven content</li><li>An MD5 representation of just the most recent database record that&#8217;s reflected on the page.</li></ul><p>And the answer I came up with was&#8230;just to ignore ETags on this PHP page. Coming up with any of those values would require a decent rewrite of the entire page, something I just don&#8217;t feel like doing right now. And, in my defense, my score turned out pretty well after I addressed the JavaScript and CSS compression issue&#8230;</p><p>Another reason I lost points was because two of the files being sent (the JavaScript and the CSS) weren&#8217;t being compressed. Most of my site uses PHP, which uses the zlib library to compress data sent to the browser. So PHP on the server compacts the HTML, it gets sent to the browser in compressed format, then the browser decompresses it and reads it. That&#8217;s great and generally recommended, but the JavaScript and CSS pages aren&#8217;t being handled by PHP. One solution is to use Apache&#8217;s mod_gzip or mod_deflate module to compress CSS and JavaScript files. To do that, add this code to an .htaccess or .conf file:</p><pre>&lt;IfModule mod_deflate.c&gt;
&lt;FilesMatch "\.(js|css)$"&gt;
SetOutputFilter DEFLATE
&lt;/FilesMatch&gt;
&lt;/IfModule&gt;</pre><p>That code basically says if mod_deflate is loaded, any file that ends with .js or .css should be ouptut using the deflate filter.</p><p>After I took all these steps, I got my YSlow grade up to a 98! I&#8217;m pretty pleased with that result. Also, in more concrete terms, if a user accesses my home page for the first time, they perform 4 HTTP requests and download just over 21KB of data. Subsequent requests of that same page require only 1 HTTP request and 3KB of data to be downloaded. That should make a big difference.</p><p>To wrap up this thread, I&#8217;ll mention two things. First, the YSlow plug-in and report is a very useful tool, but it&#8217;s not the only test or indicator of a site&#8217;s performance. I do think it&#8217;s a great place to start, though. Second, in researching some of these fixes, I came across several other sites where people did the same thing I did (tested their site using YSlow, then tried to address the problems). If you&#8217;re interested in this process, you may want to search online to read some of those other articles.</p><p>(As a post-script, I will add that one can improve the ETag score by disabling ETags in Apache, strange as this may seem. By doing so, it forces browsers to rely upon the caching headers. So if you can&#8217;t or don&#8217;t want to get ETags to work, turn them off and they won&#8217;t cause a problem.)</p><p>As always, thanks for reading and let me know if you have any questions.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2009/01/22/speeding-up-web-sites-using-yahoo-yslow-part-3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> <series:name><![CDATA[Speeding Up Web Sites using Yahoo!'s YSlow]]></series:name> </item> <item><title>My Sabbatical</title><link>http://www.larryullman.com/2008/11/30/my-sabbatical/</link> <comments>http://www.larryullman.com/2008/11/30/my-sabbatical/#comments</comments> <pubDate>Sun, 30 Nov 2008 19:43:35 +0000</pubDate> <dc:creator>Larry</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[about]]></category> <category><![CDATA[framework]]></category> <category><![CDATA[JavaScript]]></category> <category><![CDATA[writing]]></category><guid
isPermaLink="false">http://www.larryullman.com/?p=9</guid> <description><![CDATA[As I&#8217;ve previously mentioned in my newsletter, I&#8217;ve just wrapped the third edition of my &#8220;PHP for the World Wide Web: Visual QuickStart Guide&#8221; book and, at this moment, don&#8217;t even have another book lined up for the first time in literally several years. I expect I&#8217;ll do another book or two in 2009 but [...]]]></description> <content:encoded><![CDATA[<p>As I&#8217;ve previously mentioned in my <a
href="http://www.larryullman.com/newsletter.php">newsletter</a>, I&#8217;ve just wrapped the third edition of my &#8220;PHP for the World Wide Web: Visual QuickStart Guide&#8221; book and, at this moment, don&#8217;t even have another book lined up for the first time in literally several years. I expect I&#8217;ll do another book or two in 2009 but no contract has been signed yet, so I&#8217;ve got some well-earned downtime ahead of me. Of course, down time is a relative thing.</p><p>I do have two or three Web sites to do in 2009, but even a fairly complex site requires much less of me than a full-on book, so I don&#8217;t consider those to be major hurdles. Plus, I need to keep my skills up and use new sites as an opportunity to try and learn new things. So how will I be spending most of my so-called sabbatical?<span
id="more-9"></span></p><p>Besides exercising and reading more, doing some stuff about the house, and playing some <a
href="http://www.nintendo.com/wii">Nintendo Wii</a> (a present to myself), there are lots of work-related tasks ahead of me. I buy quite a lot of computer books (I&#8217;m a book person, in many ways) but I don&#8217;t always read them as thoroughly as I would like. This is a great irony, as I write books that I hope/expect others to read in order and completely. Anyway, so I&#8217;ve got about three dozen books that I&#8217;ve purchased over the past few years, mostly on advanced programming concepts, <a
href="http://www.ruby-lang.org/en/">Ruby</a>, <a
href="http://en.wikipedia.org/wiki/Ajax_(programming)">Ajax</a>, and <a
href="http://www.php.net">PHP</a>, that I&#8217;ll be going through, using this blog as a place to keep notes on  the most interesting things I learn. Or, more likely, things I once learned but since forgot and was happily reminded of.</p><p>Second, there are some new technologies that I want to either learn from scratch or improve my knowledge of. In the latter category, I plan on more fully mastering the <a
href="http://framework.zend.com/">Zend</a> and <a
href="http://rubyonrails.org/">Ruby on Rails</a> frameworks (in PHP and Ruby, respectively). Both are talked about a lot and I think the only way I&#8217;ll come up with an opinion of them with which I&#8217;m comfortable is if I give them both a fair shake. I&#8217;ll be posting my continued results in this blog. Of the new topics I want to investigate, <a
href="http://www.adobe.com/products/flex/">Flex</a> is probably foremost. (As I&#8217;m writing this, I&#8217;m on my way to the Adobe MAX 2008 conference in San Francisco, where I&#8217;ll start the Flex learning process.)</p><p>Finally, I have been promising and do intend to create an online guide to JavaScript. I get frequent requests for writings on this subject and as my primary publisher (<a
href="http://www.peachpit.com">Peachpit Press</a>) already has a JavaScript book out, it&#8217;s unlikely I&#8217;ll ever write a formal one. Anyway, I&#8217;ve created a Wiki on my site for this purpose and started roughing in the pages. Once I have a decent amount of content there, I&#8217;ll make it live.</p><p>If you have any questions about any of this, or if there&#8217;s something you&#8217;d like me to do or look into during my sabbatical, let me know and I&#8217;ll see if I can oblige your request.</p> ]]></content:encoded> <wfw:commentRss>http://www.larryullman.com/2008/11/30/my-sabbatical/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
<!-- Served from: www.larryullman.com @ 2012-05-21 15:04:27 by W3 Total Cache -->
