How to Speed Up Your Website?
If you are serious about ranking high on search engines, you should pay attention to your site’s speed. A long loading time can be very detrimental to your ranking because it stands in the way of providing a great user experience to your visitors.
But just how do you speed up your site? Here are some of the best practices.
- Have an expires header.
Placing an expires header for an image or a page signals to the browser that it should store that particular file in cache. What this means is that you enable the browser to keep a copy of these pages so when a user visits your site again, it will load quicker.
- Use compression.
Yahoo suggests that you should enable Gzip compression to reduce the size of HTTP response by as much as 70%. Gzip, then, lowers the page’s weight and makes your page load faster.
- Use HTTP Keep-Alive.
HTTP Keep-Alive is a feature that your hosting provider can give you. It is turned off by default. It helps reduce latency and makes your page load faster on repeat requests.
- Employ a Content Delivery Network.
An excellent content delivery network has several servers that are physically apart from each other. You can then host your content on these various servers. This allows you to serve up content from a server that is nearest to the user or from a server that is faster and less busy. In both cases, you can dramatically speed up your page’s loading time.
- Think of your mobile page too.
If you have a separate mobile page that redirects your visitors to a different page, such as those visiting www.yourdomain.com getting redirected to m.yourdomain.com, then be sure to use a redirect that is cacheable.
- Tweak your content.
Loading times are directly affected by the size of your page and the number of elements in it. So reduce these elements to get a faster loading time.
Here are some suggestions:
- Pare down your codes.
There are a lot of elements in your code that do nothing for your page. You can remove these elements with tools such as Will Peavey minifier, which is available athttp://www.willpeavy.com/minifier. It can help you delete HTML comments, white spaces and CDATA sections and decrease the page size.
- Optimize your images.
Remember that JPEGs are great for photos while GIFs are perfect for low-resolution images. PNGs, on the other hand, are great for everything else. If you are not sure, there are tools that analyze image files and tell you what formats they should be in. Be sure to tell the server how to size your image. If you can use a third-party server for your images, such as Flickr or Amazon S3, it might help speed up your load times as well.
- Remove broken links and add a favicon.
404s slow down your page without benefit to the user, so fix broken links and images to speed up your load time. Also, browsers always look for a favicon each time it loads your page, so get one, rather than have browsers waste precious time looking for it.
- Let CSS do it. If you can code something in CSS, then do it in CSS rather than have it on HTML. For example, instead of repeatedly specifying properties for your images, links and headers, let CSS handle it.
- Reduce the DOM or Document Object Model.
There are other stuff that you could try to help increase your site’s loading speed.
Put slashes at the end of links.
- If you are using cookies, then make sure that you reduce its size.
- Avoid using redirects.
- To ensure that a static page is cached, remove all dynamic elements in it such as ? in the URL.
- Place a character set in your code.
There are a lot of ways which can help you speed up your website, and these are just the most important ones and ones that are sure to make your page load significantly faster. Remember, each step here might improve your loading times only by milliseconds, but these milliseconds count!