1. Minimize TCP connections
Ensure the web server uses Keep-Alive
headers.
2. Reduce DNS look-ups
DNS look-ups are the first thing blocking your HTTP requests.
3. Make less HTTP requests
Concatenating your scripts and CSS in a single app.js
and styles.css
is a good start. You can also inline (small) images.
4. Implement a good caching strategy
That means configuring Expires
and ETag
headers.
5. Gzip all assets
A compression level of 6 is a good compromise between file size and decompression speed.
6. Turn on TCP-Fast-Open
Not a silver bullet but something to try. It makes TCP send data earlier.
7. No redirect, please
Having redirection is essentially the same as doing another request.
8. Be closer to the user: CDN for the win
Put your assets geographically close to the user.
9. Consider HTTP pipelining
This allow several HTTP requests in a single TCP segment. The client and server must support it and worst case scenario need to he handled.
10. Increasing TCP’s Initial Congestion Window
TCP window size is small at first and increase as the network is seen stable. You can have TCP start with a bigger window size.
1/2 of these are handled by HTTP2, so really should be a 'Top 5' list ;)
"DNS look-ups" cost can be reduced by
<link rel="dns-prefetch" href="http://www.anothersite.com/">
Pre GZipping static assets at a higher (slower) ratio is better, & using z-standard or offering brotli is best in some situations.
But if you use a CDN, you might not have control over the compression, so just fogget about it B)