1. The troubles we need to solve
A. Reduce the number of HTTP requests.
What are the benefits of reducing the number of HTTP requests:
Reduce the overhead of establishing the server and client and eliminating HTTP request and response headers
Decrease The server's process and thread overhead for HTTP connections, if possible, will also include the CPU overhead of GZIP compression.
B. Reduce the size of the requested file and reduce the network bandwidth occupied by the requested data.
C. Let the user See the desired results faster.
D. Improve the client rendering speed.
E Allow the browser to request more data at the same time.
F. Improve the server response speed.
G .Control the client Cache through versioning.
Quote
2. How to solve our troubles
A. How to reduce the number of HTTP requests
1. Merge JS files and CSS files.
2. Merge frame images and relatively less changed images into one, and complete rendering through CSS background cutting.
3. Properly use local Cache to cache JS/CSS /IMAGE.
4. Reasonably use UserData to cache JS files. FF users can request the server separately, which can solve the problem of 80% of users.
5. Merge JS and CSS into one file
The writing method is as follows :
🎜> window. innerHTML= "Legendary JS tester.If you see me, then JS also works";
Files referenced by JS and Style at the same time are all valid