How to use rel=“preload” as=“style” or as=“script” or Better method for page speed

前端 未结 2 1823
孤独总比滥情好
孤独总比滥情好 2021-01-16 11:11

i am trying to reduce my webpage load time . When i am searching i come to this point preload css and javascript .

So i am trying to implement this

2条回答
  •  孤街浪徒
    2021-01-16 11:48

    https://developers.google.com/web/updates/2016/03/link-rel-preload

    See the above article link. I saw the link shared above. Preload never makes the page load the page fast. It only gives the priority to the files which is declared rel="preload" to load very early as the page loads up. You can read the article again Also the article shared by me. It will say the same.

    You will need other methods to load the page fast. This method will not be helpful. There are few methods listed below you can use to make page load faster.

    1. You can minify css and js files which will load very very fast than normal file. You can minify script and css files from (https://www.minifier.org/) here.

    2. Avoid external links of css and js files

    3. Avoid spaces and Newlines in code.

    4. Use compressed images which will also load faster.

    5. Enable Caching.

提交回复
热议问题