Optimization Tip: Careful with What You Are Loading on Your 404 Pages - DailyBlogTips |
| Optimization Tip: Careful with What You Are Loading on Your 404 Pages Posted: 01 Mar 2012 08:45 PM PST Sometime ago I started trying to optimize the performance of DailyBlogTips, and during certain times of the day (i.e., peak hours) traffic was high and the responsive time was pretty awful. I started by changing my cache plugin, removed unnecessary plugins and optimized the options table, and then I closed comments on older posts. Despite that the site was not loading as fast as it could, so I started exploring what could be the issue. By checking the CPU usage I realized that my 404 pages, which I happen to serve a lot for some reason, were consuming a lot of resources. When I went to see what I was displaying there sure enough I found the problem: many years ago (i.e., 3 or 4) I had this idea that it would be cool to display my whole archive of posts in the 404 pages, so that a lost user could easily browse around. By that time I had 400 or so posts, and the site was smaller, so this didn’t wasn’t causing any server problems. But these days I have close to 2,000 posts, and the traffic increase as well, so serving all those links every time a 404 page needed to be served was killing my server. I changed that to a simpler 404 page containing just an error message and the difference was noticeable. I know you are probably not loading 2,000 links on your 404 pages, but even small script or plugin calls could cause a problem, especially if you get many 404 errors (this tends to happen if you have a lot of backlinks, as people often link to the wrong URL). So double check to make sure your 404 is lean and mean. Original Post: Optimization Tip: Careful with What You Are Loading on Your 404 Pages |
| You are subscribed to email updates from Daily Blog Tips To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
| Google Inc., 20 West Kinzie, Chicago IL USA 60610 | |



0 comments:
Post a Comment