While more and more people are getting access to high speed internet, there are many left on dial up. Be kind to those visitors and do a few, simple things to speed up your webpages. Think the speed of your website doesn’t matter? Think again…
A 1-second delay in page load time yields:
- 11% fewer page views
- 16% decrease in customer satisfaction
A study found that:
- 47% of people expect a web page to load in two seconds or less.
- 40% will abandon a web page if it takes more than three seconds to load.
- 52% of online shoppers say quick page loads are important for their loyalty to a site.
Here are some tips you can use to speed up your website:
- Minimize HTTP Requests
- 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.
- Enable compression
- 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
- IIS: Configure HTTP Compression: add this line to your web.config: <urlCompression doStaticCompression=”false” doDynamicCompression=”false” /> or enable IIS compression on your webserver.
- 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.
- Use:
- In page headers: <%@ OutputCache Duration=”60″ VaryByParam=“*” %>
- In web.config: <staticContent><clientCache cacheControlMode=”UseMaxAge” cacheControlMaxAge=”30.00:00:00″ /></staticContent>
- Cache your data in the code behind
- Minify Resources
- 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.
- Minify CSS: Remove comments and sources from CSS files, and combine CSS files. Optimize the CSS files and avoid redundancy in styles.
- Minify JavaScript using the compression tools to get the minimum file size possible:
- Minify HTML
- Too Much White Space Isn’t Good, collapse whitespaces
- Omit Redundant Tags and Attributes
- Use Descriptive ALT Values
- Use Less Meta Tags
- Remove All Comments
- Don’t Use Complex Tables and Reduce the number of nested tables
- Use Name Colours Rather Than Hex
- Ensure All Tags are Closed
- Reduce ViewState
- Optimize images
- The images on your site can take up a lot of bandwidth, which affects the loading time of your page.
- Set Image Resolution to 72dpi
- Optimize GIF, JPG, PNG files
- Link Thumbnails to Larger Images
- Use Proper Image Formats
- Use Styled Text Instead of Graphic Text
- Don’t Scale Images
- The Fewer Graphics the Better
- 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:<link rel=”stylesheet” type=”text/css” media=”all” href=http://yourURL/style.css />
- 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.
- Remove social network buttons
- Consider lazyloading — or on-demand content
References:
https://www.monitis.com/blog/2011/05/29/30-tips-to-optimize-htmlcssimages-for-smooth-web-experience
http://www.sitepoint.com/complete-guide-reducing-page-weight/