Anonymous
Domino 2.0 Rich Internet Applications with IBM Lotus Notes/Domino
You are here: Today » Fooling YSlow
« Some color functions in JavaScript
Building a Domino website: overview and download »

Fooling YSlow

Although YSlow is a really nice tool, it only gives some basic tips. I played around a little to see if I could 'cheat' to get a better ranking with my blog.

Rule 3: Add an Expires Header

I didn't want to bother our Notes administrator with web site rules for the images, but I did move my JavaScript to a page. My CSS is also rendered by a page design element. I added an Expires Header to both by adding a computed text on them with the code:

@SetHTTPHeader("Expires"; @Adjust(@Now;1;0;0;0;0;0));
""

This sets the Expires Header to same date, next year, upgrading my score on this item to a D.

Rule 6: Move all JavaScript to the bottom

Since I only used one external .js file and all my JavaScript is non-obtrusive behaviour added after the page is loaded, it was no problem moving it to the bottom of the page, right before the end of the body tag. Easy to score an A on this one.

Rule 10: Minify JS

I tricked YSlow to think that I 'minified' my JavaScript by removing all comments and tabs. Another A earned.

Rule 13: Configure ETags

In the rule, it says: "If you're not taking advantage of the flexible validation model that ETags provide, it's better to just remove the ETag altogether. The Last-Modified header validates based on the component's timestamp. And removing the ETag reduces the size of the HTTP headers in both the response and subsequent requests." And on IBM Developerworks is explained how to turn them off on a Domino server: "You can disable ETags for diagnostic purposes. Set the Domino environment variable DominoDisableETags=1 in the server Notes.ini file".

The result

My score: Performance Grade: B (88). When only adding the web site rules to add Expires Headers to the images, I think I would score an A. With the caching of my .js and .css files, the homepage of my blog now loads in 0.2 seconds, viewed from my place. I wonder what the download time of my blog is like with an ocean in between?

Star rating

0%

Comments

  1. 08/08/2007 15:27:47, Rafael Vogel

    Just answering your question, from Rio de Janeiro - Brazil: Firebug says 4.8s, wich still is pretty fast for me!

  2. 11/08/2007 22:29:18, Michel Van der Meiren

    Thank you, Rafael! This shows that we all have to be very concerned about site performance. I didn't realize it took so long for my blog to swim across the ocean.

To add a comment, log in or register as new user. It's free and safe.