Redirects trigger an additional HTTP request-response cycle and delay page rendering. In the best case, each redirect will add a single roundtrip (HTTP request-response), and in the worst it may result in multiple additional roundtrips to perform the DNS lookup, TCP handshake, and TLS negotiation in addition to the additional HTTP request-response cycle. As a result, you should minimize use of redirects to improve site performance.

To make pages load faster, limit the size of the data (HTML markup, images, CSS, JavaScript) that is needed to render the above-the-fold content of your page. There are several ways to do this:

Structure your HTML to load the critical, above-the-fold content first in order to optimize Google Page Speed Insights

Reduce the amount of data used by your resources

Reduce server response time in order to optimize Google Page Speed Insights

You should reduce your server response time under 200ms. There are dozens of potential factors which may slow down the response of your server: slow application logic, slow database queries, slow routing, frameworks, libraries, resource CPU starvation, or memory starvation. You need to consider all of these factors to improve your server’s response time.

Enable Compression in order to optimize Google Page Speed Insights

Compressing resources with gzip or deflate can reduce the number of bytes sent over the network.

Minify JavaScript in order to optimize Google Page Speed Insights

Eliminate render-blocking JavaScript and CSS in above-the-fold content in order to optimize Google Page Speed Insights

You should avoid and minimize the use of blocking JavaScript, especially external scripts that must be fetched before they can be executed. Scripts that are necessary to render page content can be inlined to avoid extra network requests, however the inlined content needs to be small and must execute quickly to deliver good performance. Scripts that are not critical to initial render should be made asynchronous or deferred until after the first render. Please keep in mind that for this to improve your loading time, you must also optimize CSS delivery.

Optimize images in order to optimize Google Page Speed Insights

Properly formatting and compressing images can save many bytes of data.

Summary

By tweaking and editing .htaccess, we enabled compression and leveraged browser caching. We can do compression in three ways. Gzip, deflate or compressing with php. The first example shows how we did compression by using deflate. If we can’t do compression by using gzip or deflate, we can still do compression by using php. Second example shows how we did compression by using php. As you see on both of these examples, we also set an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network. Therefore, website speed increases.

The review of enabling compressing and leveraging browser caching is 2 of the Google Page Speed Insights elements. I will review other 8 Google Page Speed Insights elements on my next post to increase the website speed to improve SEO.

Website Speed Test is Being Done Right

Website-Speed-Test.com presents an innovative Search Engine Optimization (SEO) tool website speed test. Test the download speed for a webpage and all of its resources.

We built this Website Speed Test to help you analyze the load speed of your websites and learn how to make them faster. It lets you identify what about a web page is fast, slow, too big, what best practices you’re not following, and so on. We have tried to make it useful both to experts and novices alike.

In short, we wanted it to be a easy-to-use tool to help webmasters and web developers everywhere optimize the performance of their websites.

Feature Overview

Examine all parts of a web page – View file sizes, load times, and other details about every single element of a web page (HTML, JavaScript and CSS files, images, etc.). You can sort and filter this list in different ways to identify performance bottlenecks.

Performance overview – We automatically put together plenty of performance-related statistics for you based on the test result

Performance grade and tips – See how your website conforms to performance best practices from Google Page Speed (similar to Yahoo’s Yslow). You can get some great tips on how to speed up your website this way.

Trace your performance history – We save each test for you so you can review it later and also see how things change over time (with pretty charts!).

Test from multiple locations – See how fast a website loads in Europe, the United States, etc.

Share your results – We’ve made it easy for you to perform a test and share it with your friends, work colleagues or web host.

How it works

All tests are done with real web browsers, so the results match the end-user experience exactly. We use a bunch of instances of Google’s Chrome web browser to load websites, record performance data, and so on. Tests are done from dedicated Website-Speed-Test.com servers.