The main ones are 1. Asynchronous loading 2. Loading on demand 3. Data caching (local caching of static resources that are not frequently updated, ajax request caching) 4. Adding loading to improve user experience 5.CND 6. Compression merge. If the client wants to accelerate, it should focus on file size, request time, code execution efficiency, and mobile terminals should also pay attention to issues such as using canvas for hardware acceleration of images, css layout, etc., which will also affect efficiency, page rendering, etc.
Click f12 on Chrome or ff to see the entire loading process 1. How many files are loaded, how many static and how many dynamic? 2. Are there any special abnormalities in each static loading step and each dynamic step? 3. Consider dns resolution and cache usage , whether there are any abnormalities in the delay from request to response, the transmission process, and the large inactivity time during the loading process In addition, whether the line between your network and the server is stable
1. Compress all JS file dependencies that need to be used.
2. Loading on demand means loading which JS files you need to depend on.
3. Use a CDN.
Data caching, compression and merging code
Compared to react, angular is really slow to load for the first time. There is no way, react can decide when to load based on the life cycle.
The main ones are
1. Asynchronous loading
2. Loading on demand
3. Data caching (local caching of static resources that are not frequently updated, ajax request caching)
4. Adding loading to improve user experience
5.CND
6. Compression merge.
If the client wants to accelerate, it should focus on file size, request time, code execution efficiency, and mobile terminals should also pay attention to issues such as using canvas for hardware acceleration of images, css layout, etc., which will also affect efficiency, page rendering, etc.
For the first time js is loaded, it will be loaded synchronously. If it is not required for the homepage, it can be loaded asynchronously
Compress and merge js and css into two files, apply for a free oss on Alibaba, and upload the files.
Click f12 on Chrome or ff to see the entire loading process
1. How many files are loaded, how many static and how many dynamic? 2. Are there any special abnormalities in each static loading step and each dynamic step? 3. Consider dns resolution and cache usage , whether there are any abnormalities in the delay from request to response, the transmission process, and the large inactivity time during the loading process
In addition, whether the line between your network and the server is stable