Hi all,
The website loading speed is very important factor in popular the site and website rank. Today we discuss how to improve wedsite speed. Its very important factor in wedsite.
Some important steps you should perform to increase the load speed of your website.
1. Reduce http request
Around 80% of a web page spend time to load files like images, css, javascript files, jquery files 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. We can avoide this situation to reduce the number of components on each page.
Solution
- Combine multiple style sheets into one.
- Use CSS instead of images whenever possible.
- Streamline the number of elements on your page.
- Reduce scripts and put them at the bottom of the page.
- Use CSS instead of images whenever possible.
2. Reduce Server Response Time
Server response time is very important factor in speed up your wedsite. The server response time means, the amount of time it takes for a web server to respond to a request from a browser. First, register your domain in good hosting provider.
Factors Influencing Server Response Times
There are some factors that influence how quickly your server responds, making it difficult to pinpoint exactly where the bottleneck is, the following are are some of the primary factors in how fast your server responds:
- Traffic and Hosting:More traffic, more problems and also If you improve the quality and scope of your web hosting you can improve your server response time, but you will have to spend money.
Website Traff - Server Software:If you change your web server software or configuration you likely could improve server response time and not spend money.
- Database:
- Resource Usage:If each of your webpages used less resources, you could improve server response time and not spend money.
Ways to Reduce Server Response Times
There are two basic ways to reduce the amount of time it takes your server to respond to a request:
- Use your existing resources more efficiently.
- Upgrade your resources.
3. Enable Compression
The compression is very simple, effective way to save bandwidth and speed up your site. Most web servers can compress files in Gzip format before sending them for download. Gzip compression helps to reduce the amount of data your server needs to send to your users, which in turn speeds up the load time of your site Compression helps you to reduce the bandwidth of your pages and thereby reducing HTTP response.
4. Enable Browsing Caching
Browser caching stores webpage resource files on a local computer when a user visits a webpage. Browser cache control is directly related with the header expires date and according to the Apache documentation provides directives to control and modify HTTP request and response headers.
So if you configure your web server to set caching headers and apply them to all cacheable static resources, your site will appear to load much faster. Add below to .htaccess
## EXPIRES CACHING ##ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" ## EXPIRES CACHING ##
5. Optimize image
In image, we focus maily three things: format, size and image src attributes.
-
Image Size: To load images fastely with no delay we use smaller image size.
It’s very important and keep the image as smaller as possible. Follow the important points: crop the image with correct size, reduce color depth to the lowest acceptable level and remove image comments. - Image Format:There are some image formats are available. They are: JPEG, PNG, GIFs, BMPs or TIFFs. In web development or in web site the JPEG is the best image format. And PNG is also good,but the main drawback of this is older browsers may not fully support it. GIFs should only be used for small or simple graphics and for animated images. Do not use BMPs or TIFFs format in website.
- Image src attributes:Once you’ve got the size and format right, make sure the code is right too. In particular, avoid empty image src codes. In HTML, the code for an image includes this: <img src=””>
6. Avoide unwanted or Optimize CSS, javascript
The CSS and Javascript files are important in website. The CSS helps to style the website design and also javascript helps to perform scripting functionality.
CSS holds the styling of your web pages. We can includse CSS into our web page into two method. They are: external file and inline code. In external CSS, the code are place outside the main page we just include the CSS into our webpages. The external CSS included within the head tags. Like as below:
<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: <h3 style=”color:red; font-size:30px;” >Testing</h3>
In general, an external style sheet is preferable, because it reduces the size of your code and creates fewer code duplications.
7. Reduce Number of Plugins
Avoide the unwanted plugins.Increase the number of plugins usage the your site will be slow. Deactivate and delete unwanted plugins. Reduce the plugins usage.
8. Avoide Unwanted Comments
Avoide unwanted comments. Removing HTML comments
9. Clean up Your Database
One of the pitfalls with WordPress is that your database can get very messy very quickly due to saved drafts, post revisions, deactivated plugins etc. WP Optimize is a fantastic plugin that routinely deletes all of the stuff you don’t need that’s cluttering up your database.
After running this on the Venture Harbour database I managed to reduce the database from 5mb to 3mb, which helps speed up the time it takes for the browser to collect and return files from the database.
10. Minimize the number of files or code
Remove the unwanted files, code , comments, CSS, javascript etc.
11. fix all broken links in your websites.
12. Use a very fast hosting company
Choose suitable hosting providers like veeble.com, GoDaddy.com, BlueHost, HostGator etc. Hosting with a professional configuration can be of big help.
How to choose a web hosting service?
- Know your hosting needs.
- Investigate on host reliability and uptime guarantees.
- Study web host upgrading options.
- Check all hosting features based on your needs.
- Check prices on both sign up and renewal.
- Check hosting control panel.
13. Reduce redirects
Redirects create additional HTTP requests and increase load time. So you want to keep them to a minimum.
14. Put CSS at the top and JS at the bottom
Include the CSS file in head tag that means top of the file within head tag. And the JS file included in bottom like footer.
Put the CSS file into the document head and JS file into bottom of thedocument.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.