Get the App
SLTechnology News&Howtos  ›  Network Security  › 

There are many JS files on web pages, which affect the loading speed of web pages. How to solve this problem?

Shulou Source: shulou.com Published: 2022-06-01 09:14:48 11月26日 Update

How to solve the problem of "slow page rendering" and unreasonable page layout?

IIS7 website monitoring

You can get JS or images, css and other html files that seriously take up loading time, which can help us to speed up the opening of the website.

1. The css style files of all pages are merged into one piece of code, compressed and put into, this page can only exist and must be in the

two。 All the pages, whether external files or internal nesting, are put in front. (end label)

If the location of the tag cannot be moved, change the js and be sure to put it at the end of the page.

For example, there is [xss_clean] (); you can pre-place a hidden

Then go to the middle via js,innerHTML at the bottom of the page.

3. It's best to merge small bits and pieces of js code into one file. But a single js file should not be too large, usually no more than 25k.

These points have been done, and the speed of the first screen of your page can be about 1 second. 1 second is already very fast, and few can reach 1 second.

Tags: Pages files speed code location tags websites web pages unreasonable piecemeal single picture layout bottom fast used time best style or Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Huawei Shulou Technology Microsoft MariaDB