How to make website load faster and cause less load on the webhosting server? Do you have any tips?
So far i found a few page speed analyzers that can advice on what to do to increase website speed:
1. https://developers.google.com/speed/pagespeed/insights/
2. http://www.websiteoptimization.com/services/analyze/ (good advices on the bottom after test result)
3. http://www.dotcom-monitor.com/WebTools/website-speed-test.aspx - load times from different GEO locations
Examples actions to decrease website load time:
- optimize images to be as smallest in data size as possible - try these optimizers: http://www.imageoptimizer.net/Pages/Home.aspx ; http://tools.dynamicdrive.com/imageoptimizer/ ; http://jpeg-optimizer.com/
- reduce number of page elements. Example, use "CSS sprites" OR use so called "HTML maps" if you have static images in a row to combine it and assign them links (multiple links from one image) here are ImageMap generators: http://imagemap-generator.dariodomi.de/ (click first corner, then click second corner and click New Area. repeat)
- Add images into so called data:uri (embed images into html code not needing to have image file)
- miniffy javascripts & css
- prevent javascript delaying load of webpage by setting async attribute to it, example: <script async src="my.js"> OR move javascript to the website footer OR embed small javascripts directly into the webpage code (see how)
- another ideas how to optimize site here
Add this to .htaccess file (it should instruct website visitor webbrowser to cache mentioned elements and dont request them from your server)
Add this to .htaccess to compress content sent to website visitor (save datatransfer, cpu and serve site faster)## Browser caching - Tell browser to cache and not download again ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 week"
ExpiresByType text/html "access 1 day"
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 month"
ExpiresDefault "access 1 month"
</IfModule>
## Browser caching ##
Test whether your site output is compressed: http://www.whatsmyip.org/http-compression-test/<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
If having wordpress, or other CMS, search for "Cache plugin/mod" which can cache some dynamic elements of the webpage into static one decreasing load on server and time to serve content
Bookmarks