Hello Friends, In previous two posts I’d explained you two methods Caching and Compression to improve website performance. Today I am going to share other remaining methods to improve your website perfomance, which are:-
- Minification of css, javascript and html
Compacting CSS, Javascript and Html code saves many bytes of data and speed up download and parse times. - Image optimization
Properly formatting and compressing images saves many bytes of data. - Stopping Render-blocking JavaScript and CSS
Before the browser can render a page it has to build the DOM tree by parsing the HTML markup. During this process, whenever the parser encounters a script or css it has to stop and execute it before it can continue parsing the HTML. In the case of an external script the parser is also forced to wait for the resource to download, which may incur one or more network roundtrips and delay the time to first render of the page.
Recommendation:- You should avoid and minimize the use of blocking JavaScript and CSS, especially external scripts and css that must be fetched before they can be executed. Scripts and CSS that are necessary to render page content can be inlined to avoid extra network requests, however the inlined content needs to be small and must execute quickly to deliver good performance. Scripts and CSS that are not critical to initial render should be made asynchronous or deferred until after the first render.
References
https://developers.google.com/speed/docs/insights/BlockingJS
https://developers.google.com/speed/docs/insights/EnableCompression
Thanks Please share if you like
Everything is very open with a precise explanation of the challenges.
It was definitely informative. Your site is very useful.
Many thanks for sharing!