以上几点,本人菜鸟,只是略微有些了解,比如不要第一次加载所有js文件等等,希望有高手能给出一点更具体的实施的措施,十分感谢!
为情所困2017-05-15 16:58:04
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.
PHP中文网2017-05-15 16:58:04
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.
伊谢尔伦2017-05-15 16:58:04
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.
黄舟2017-05-15 16:58:04
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
高洛峰2017-05-15 16:58:04
Compress and merge js and css into two files, apply for a free oss on Alibaba, and upload the files.
滿天的星座2017-05-15 16:58:04
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