Thursday 6 September 2012

15 Tips to Speed up Your Website


Any search engine wants to provide users a great user experience, just like Google, and a fast site improves overall site quality and increases user satisfaction. Everybody deserves a fast web experience. Making a backup before starting is necessary. Some of the following tips can be implemented to increase the speed of website.

a) Server- Choosing suitable hosting for your venture is the first step in starting a website. Hosting with a professional configuration can be of big help.

  • Leverage browser caching-When you set an expires header for a resource, such as all jpeg images, the browser will store those resources in its cache. The next time the visitor comes back to the page it will load faster.
  • Enable keep-Alive- signal is often sent at predefined intervals and plays an important role on the Internet. After a signal is sent, if no reply is received, the link is assumed to be down and future data will be routed via another path until the link is up again. In fact, HTTP Keep-Alive allows TCP connections to stay alive and it helps reducing the latency for subsequent requests.
  • Enable gzip compression- Gzip is the most popular and effective compression method currently available and generally reduces the response size. It's an easy way to reduce page weight.
  • Make landing page redirects cacheable- Mobile pages redirect users to a different URL,  so making a cacheable redirect can speed up page load time for the next time visitors try to load site
  • Use a CDN-is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. The server selected for delivering content to a specific user is typically based on a measure of network proximity.

b) Content elements- Since you don't have total access to your server, content elements are the most important things that you can manipulate.

  • Minimize redirects- Sometimes to indicate the new location of a URL, track clicks, connect different parts of a site together or reserve multiple domains, you need to redirect the browser from one URL to another. Redirects trigger an extra HTTP request and add latency.
  • Remove query strings from static resources-You can't cache a link with a "?" in its URL even if a Cache-control: public header is present. The question mark acts the same as Ctrl+F5. Use query strings for dynamic resources only.
  • Specify a character set-Specify a character set in HTTP headers to speed up browser rendering. This is done by adding a simple piece of code into your header.
  • Minify your codes- Removing HTML comments, CDATA sections, white spaces and empty elements will decrease your page size, reduce network latency and speed up load time.
  • Avoid bad requests- broken links result errors. These cause wasteful requests. Use online broken link checker or use Wordpress link checker for free.
  • Serve resources from a consistent URL-resources that are shared across multiple pages, make sure that each reference to the same resource uses an identical URL. If a resource is shared by multiple pages/sites that link to each other, but are hosted on different domains or hostnames, it's better to serve the file from a single hostname than to re-serve it from the hostname of each parent document.

c) CSS, JS and Images

  • Specify image dimensions-Your browser begins to render a page before images are loaded. Specifying image dimensions helps it to wrap around non-replaceable elements.
  • Optimize images- images can contain extra comments and use useless colors. Keeping image sizes to a minimum is a big help for users on slow connections. Try to save in JPEG format.
  • Put CSS at the top and JS at the bottom-Putting stylelsheets in the document head of the page prohibits progressive rendering, so browsers will block rendering to avoid having to redraw elements of the page. In most of cases, users will face a white page until the page is loaded completely.

No comments:

Post a Comment