问题
In his book "High Performance Websites" Steve Souders wrote (2007) that browsers limit parallel requests to a domain/hostname to two at a time. Is this still valid today?
回答1:
Almost incorrect today.
Most browsers have upgraded to 6 parallel connections. See Steve Souder's Browserscope > Network tab > Connections per Hostname. Older browsers still restrict to 2 connections - that may or may not be relevant to you depending on the browsers your application supports.
回答2:
Firefox bumped up its maximum per-server connection count from 8 to 15 for Firefox 3 and later. The maximum is less for servers that support persistent connections:
- Firefox 2: 2
- Firefox 3: 6
- Opera 9.26: 4
- Safari 3.0.4: 4
- IE 7: 2
- IE 8: 6 (except on dial-up)
回答3:
2 years later the same Steve Souders wrote in "Even Faster Web Sites":
IE8 and FF3 both increase the number of connections per server from two to six.
回答4:
Yes, there may be some variations, but that limitation is certainly still valid. Some browsers might allow more than two parallel requests to a host, but it's still only a few.
There may also be limitations on the server side. If you are requesting active pages, e.g. ASP/ASP.NET/PHP, they are usually limited to a single request at a time per user.
However, with bandwith increasing this limitation has a smaller impact than it had in 2007. Eventhough you can still only do a few requests in parallel, each request is faster so the limitation is not very noticable.
回答5:
The HTTP/1.1 spec suggests a cap of 2 simultaneous requests per host (With HTTP/1.0 a figure of 4 was more common).
It would be wise to assume that the client might not be able to have more than 2 simultaneous requests open at once.
来源:https://stackoverflow.com/questions/9753898/is-the-web-browser-performance-rule-only-2-requests-in-parallel-per-hostname-s