14 January 2018
Speed Website,Guide,Analytics,Developers
Sabnam Thapa
Before beginning, let’s put our feet in a user’s shoes for a few seconds; here’s how a user reacts to a slow website:
<Clicks a URL> ...
<Loading time=1s> …
<Loading time=2s > …
<Loading time=3s> …
<Ok that’s it bye bye!!>
A slow speed doesn’t affect just the user experience; it also messes up your search engine ranking, Forbes says.
So, how can you fix this?
It’s a long story, TL;DR. To cut it out short, I have listed out the most important ones. Let’s have a quick look.
Images
- Resize the images using applications. You can find a number of free as well as paid application online for image resizing. The popular ones are Google Picasa and Adobe Photoshop.
- State the image dimension in your code. It helps make the rendering process faster.
- Host your image using a different subdomain. Otherwise the browser attempts to load the image files together with the other elements of the page which slows down the page loading.
- Optimize your images. Go with the lighter image formats, such as .PNG. and JPEG. Remove the unnecessary comments, opacity, etc. that make the image heavy.
Did you know that Contentder has its own Media Management that allows you to optimize images before uploading? Also, you can organize media folders in a single place. Learn more about it at How to Edit Images with Media Management in Contentder.
Optimized code
- Minify your code and remove the dead ones. Comments, line breaks and whitespace are for visual simplicity for humans; not for computers. They make the files heavy. So, make sure to optimize your codes using tools, such as Uglify JS, Microsoft AJAX Minifier, Google Closure Compiler, etc.
- Remove the duplicate scripts because they increase the execution time.
- Optimize page rendering. Move your JS files to the bottom of the page and the CSS files of the to the top of HTML. This allows the page to load in a progressive fashion, loading the style elements of web page first, thus, creating an impression of faster page-load.
- Merge your JS and CSS files together. If you have a large number of JS and CSS files, make sure to merge them together, but into an order that optimizes rendering.
- Rule out the JS. elements from the library which you don’t need. This helps your site to load much faster.
- Use reduced versions of codes. Longer codes eat up a huge chunk of time for execution. So, if the codes can be reduced, just do it.
- Use SSL. Studies show that the encrypted form of websites load faster as compared to the non-encrypted ones. Plus, they secure your websites.
Server
- Buy a good hosting service. You can’t go around whining about the speed if you are using a bad hosting service. Analyze your needs and long-term vision for your website, choose the type of hosting that fits your shoes.
- Set up GZIP compressor in your server. The repeated texts contained in HTML and CSS files consume a lot of file size. GZIP compressions replaces those similar strings and reduces the file size up to 70%. Thus, the transfer of files from server to your browser takes less amount of time.
- Use different server machine for Database. It helps reduce the load off the RAM in case your website has high web traffic, service calls, or has a high-volume database. Also, this is also beneficial for various security reasons.
Conclusion:
Speeding up your site is not so simple. You have to look at a number of aspects. The above-mentioned tips are the crucial ones among those aspects.
The next thing you must do is monitor your site’s speed. There are a number of web application which can help you do so.