Every time a client sends an HTTP request, it has to send all associated cookies that have been set for that domain and path along with it; adding the factor that HTTP request headers are sent uncompressed, increasing the latency and getting higher at the beginning of a new browser session. To minimize net congestion, TCP employs the
slow startalgorithm for new connections; this limits the amount of data that can be sent by the initiator of the connection before the data must be acknowledged by the recipient. If the initiator sends more than that amount of data over a new connection, an additional Round-Trip Time is incurred.
Extracted from the Make the Web Faster Google’s project.
Minimize request size
One way to cut down client request time is reducing the number of bytes uploaded as request header data keeping cookies and request headers as small as possible ensures that an HTTP request can fit into a single packet limited widely by the most used networks to approximately 1500 bytes per packet, so constraining each request size less than 1500 bytes can reduce the Overhead of the request stream.
- Keep cookie size less than
1000 bytesand between the average size of
400 bytes; avoiding duplicated cookie fields and removing unused.
- Limit URL string lengths to a few of hundred bytes at most avoiding URLs with multiple parameters.
- Put attention to the HTTP_REFERER header using it properly.