Showing posts with label Performance. Show all posts
Showing posts with label Performance. Show all posts

Testing Your Website in a Realistic Environment (InformIT article)

My last website performance related article published by InformIT, Testing Your Website in a Realistic Environment, deals with an interesting question: "assuming you've fixed most of the performance problems your web site had, how can you test what your global visitors experience without buying a round-the-world ticket?"

Fix Your Web Site Performance Problems (InformIT article)

If you've realized that you might have HTTP-related performance problems when reading my Why is my web site so slow article published by InformIT, you can find a variety of quick fixes and more permanent solutions in my Fix Your Web Site Performance Problems article (also published by InformIT).

Why is my web site so slow (InformIT article)

If you've been involved in more than a few website deployments, I'm positive that you've encountered the following scenario: The website was developed, tested, demonstrated to internal audiences, accepted, deployed, …and failed completely due to unacceptable performance. In my InformIT article Why is my web site so slow I'm describing various reasons that can cause unacceptable performance for global visitors of your web.

Query-string-based revision control

One of the easy ways to improve the perceived response time of your web site is to ensure that your web server sets explicit Expires: HTTP header on the static web page components (JavaScript libraries, CSS files, images …), thus reducing the number of HTTP requests sent by the browser. However, if you change your JavaScript code or CSS, your visitors could be stuck with the old version for a long time.

If you use static HTML and a decent development environment, you can easily rename the JavaScript or CSS files (and the HTML pages get updated as a side effect). For more complex environments, you could use an easy trick: append the revision number as a query string after the file name:

<link href="myStyle.css?57” rel="stylesheet" type="text/css" />
<script src="myCode.js?42" type="text/javascript"></script>

Most web servers ignore the query string after the name of a static file, but the browsers perform the caching on whole URL (so x.js?1 is different from x.js?2).

Analyze your web page peformance

Straight from the Yahoo Developer Network: YSlow analyzes any web page and generates a grade for each rule and an overall grade. If a page can be improved, YSlow lists the specific changes to be made. Highly recommended tool :)