For fast loading website you have to do some compression. ๐
you can check page speed here:
- https://tools.pingdom.com/
- https://developers.google.com/speed/pagespeed/insights/
Compress .jpg to .png:
you can use photoshop for image compression: File – > Save for web and device.
Compress Js/Jquery:
<script type=”text/javascript” src=”jquery_1.7.2.min.js” async></script>
Add ‘async’ in js for compression.
Compress CSS:
1 | <link href="style.css" rel="stylesheet" type="text/css" /> |
to
1 2 3 4 5 6 7 8 9 10 11 | <script> var cb = function() { var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'style.css'; var h = document.getElementsByTagName('head')[0]; h.parentNode.insertBefore(l, h); }; var raf = requestAnimationFrame || mozRequestAnimationFrame || webkitRequestAnimationFrame || msRequestAnimationFrame; if (raf) raf(cb); else window.addEventListener('load', cb); </script> |