Web Site Performance

I came across a post on StackOverflow.com regarding web site performance. Quite often you can take a look at your application and find 10 different ways to make it more efficient. Depending on your environment, you may have many different ways to increase performance. For instance, in a shared hosting environment, you’ll likely be limited as to what you can do on the server, but can tweak your application appropriately.

Here are a few things I’d recommend:

  1. Compress your HTML output using built-in compression or third party software like GZip.
  2. If you are using ASP.NET, make sure you minimize your ViewState by turning it off for everything and then determining what items actually need it. ViewState can add quite a bit to your output and as site hits begin to add up, so won’t your traffic.
  3. Move your images, CSS, and JavaScript files to a content delivery network (CDN) or sub-domain. Keep in mind that there are many parts to retrieving a site such as server through-put and bandwidth. At a minimum, you should use a sub-domain to send your files to the browser. This will allow the browser to load your page completely, even if the images, CSS, and JavaScript are not done loading. Finally, when using traffic tools, your images and other files will dominate the results. By moving your content files to another domain, you can provide better traffic reports.
  4. JavaScript files should be at the bottom of your HTML output. If your JavaScript files are at the top of the page and are rather large in size, the browser will attempt to download those before continuing down the page.
  5. Use a tool like CompressJavaScript.com to compress your JavaScript files. It’s also a good idea to compress your CSS.

If you have any more tips, or corrections to anything that I’ve listed above, be sure to comment about it here.

Digg this story here: http://digg.com/programming/Web_Site_Performance

Comments

# re: Web Site Performance

Monday, September 29, 2008 12:15 PM by KimKman

Thanks for the tips Jason. Nice. Had not thought about the sub-domain for content. Will be setting up CDN shortly also.

# re: Web Site Performance

Monday, September 29, 2008 12:45 PM by zowens

I find compression of JavaScript and Css at runtime a great way to develop and optimize for performance concurrently. I'm a huge fan of website optimization... so my tip is to use CSS Sprites (decreases the number of HTTP requests on your images) and to cache your JavaScript, CSS, and Images. This will decrease the load on your server and the pages will load much faster for the user since they will have a primed cache after their first ping of your site. Also, I remove whitespace for my HTML just like the CSS and JavaScript so that the HTTP request is much smaller.

# re: Web Site Performance

Wednesday, October 01, 2008 10:06 AM by Jason N. Gaylord

Thanks for the extra info!

# re: Web Site Performance

Saturday, October 04, 2008 5:36 AM by zuborg

Compression doesn't accelerate rendering at all, it just accelerates content delivering. And on-the-fly compressiong add more load to server.

YSlow is great plugin to reveal performance problems. Here are a lot of tips from athors of YSlow: developer.yahoo.com/.../rules.html

You also can use some visual tools to verify site loading speed, like http://Site-Perf.com/

# My favorite links from the 1:1st week of October 2008

Sunday, October 05, 2008 10:38 AM by YESChandana -Blog

My favorite links from the 1:1st week of October 2008

# My favorite links from the 1:1st week of October 2008

Wednesday, October 22, 2008 9:08 AM by || yeschandana ||

My favorite links from the 1:1st week of October 2008

# re: Web Site Performance

Sunday, March 27, 2011 8:32 PM by weblogs.asp.net

Web site performance.. Slap-up :)

# re: Web Site Performance

Monday, April 25, 2011 9:06 AM by weblogs.asp.net

Web site performance.. May I repost it? :)

# re: Web Site Performance

Wednesday, June 08, 2011 8:27 AM by weblogs.asp.net

Web site performance.. Huh, really? :)

Leave a Comment

(required) 
(required) 
(optional)
(required)