10 things you can do to speed up your site
1. Minimize HTTP Requests
According to Yahoo, 80% of a Web page’s load time is spent downloading the different pieces-parts of the page: images, stylesheets, scripts, Flash, etc. An HTTP request is made for each one of these elements, so the more on-page components, the longer it takes for the page to render.
That being the case, the quickest way to improve site speed is to simplify your design.
- Streamline the number of elements on your page.
- Use CSS instead of images whenever possible.
- Combine multiple style sheets into one.
- Reduce scripts and put them at the bottom of the page.
2. Reduce server response time
Your target is a server response time of less than 200ms (milliseconds). And if you follow the tips in this article, you’re well on your way to achieving this.
Google recommends using a web application monitoring solution and checking for bottlenecks in performance.
3. Enable compression
Large pages (which is what you could have if you’re creating high-quality content) are often 100kb and more. As a result, they’re bulky and slow to download. The best way to speed their load time is to zip them—a technique called compression.
Compression reduces the bandwidth of your pages, thereby reducing HTTP response. You do this with a tool called Gzip.
Most web servers can compress files in Gzip format before sending them for download, either by calling a third-party module or using built-in routines. According to Yahoo, this can reduce download time by about 70%.
4. Enable browser caching
When you visit a website, the elements on the page you visit are stored on your hard drive in a cache, or temporary storage, so the next time you visit the site, your browser can load the page without having to send another HTTP request to the server.
Here’s how Tenni Theurer, formerly of Yahoo, explains it…
5. Minify Resources
WYSIWYG resources make it easy to build a Web page, but they sometimes create messy code—and that can slow your website considerably.
Since every unnecessary piece of code adds to the size of your page, it’s important that you eliminate extra spaces, line breaks, and indentation in your code so your pages are as lean as possible.
6. Optimize images
With images, you need to focus on three things: size, format and the src attribute.
Oversized images take longer to load, so it’s important that you keep your images as small as possible. Use image editing tools to:
- Crop your images to the correct size. For instance, if your page is 570px wide, resize the image to that width. Don’t just upload a 2000px-wide image and set the width parameter (width=”570”). This slows your page load time and creates a bad user experience.
- Reduce color depth to the lowest acceptable level.
- Remove image comments.
7. Optimize CSS Delivery
CSS holds the style requirements for your page. Generally, your website accesses this information in one of two ways: in an external file, which loads before your page renders, and inline, which is inserted in the HTML document itself.
The external CSS is loaded in the head of your HTML with code that looks something like this:
<!—Your styles –>
<link rel=”stylesheet” type=”text/css” media=”all” href=http://yourURL/style.css />
Inline CSS is nested in your page’s HTML and looks like this:
8. Prioritize above-the-fold content
Having just recommended that you use only one CSS stylesheet and no inline CSS, there is one caveat you need to consider. You can improve user experience by having your above-the-fold (top of the page) load faster—even if the rest of the page takes a few seconds to load.
9. Reduce the number of plugins you use on your site
Too many plugins slow your site, create security issues, and often cause crashes and other technical difficulties.
10. Reduce redirects
Redirects create additional HTTP requests and increase load time. So you want to keep them to a minimum.
If you’ve created a responsive website, more than likely, you have redirects in place to take mobile users from your main website to the responsive version.