Speeding Up Your PHP Web Site
Summary
In this article we have looked at a few basic techniques for improving the performance of your web site.First we looked at several browser-based tools, including Page Speed, Yslow and Smush.it. Next I briefly discussed using a Content Delivery Network for serving static web site content.
I then showed you how to reduce the size of your HTML, JavaScript and CSS using tools such as YUI Compressor and htmlcompressor. I then discussed caching of generated content using the Zend_Cache component of the Zend Framework.
Finally, I showed you how to automatically compress returned content either by using Apache's mod_deflate module or PHP's gzencode() function.
The great thing about the ideas mentioned in this article is that you can immediately see the improvement from implementing them, since you will receive higher scores in Page Speed and Yslow, and you will notice how much faster your pages load!
Resources
Documentation
Further Reading
- PhpRiot articles about Zend_Service_Amazon_S3 and Zend_Cache
- Beyond Gzipping (Tony Gentilcore, Google)
- Exception Performance (Yahoo! Developer Network)
- Best Practices for Speeding Up Your Web Site (Yahoo! Developer Network)
- Using Site Speed in Search Engine Ranking (Google Webmaster Central Blog)
Other Options
- Download a PDF version of this article
- Put your PHP knowledge to the test with our online and iPad/iPhone quizzes
- View or post comments for this article
- Browse similar articles by tag: Amazon, Google, Page Speed, PHP, Yslow, yuicompressor
No comments:
Post a Comment