Can browsers download two components in parallel p

2019-05-07 13:17发布

问题:

I know that: "browsers can download two components in parallel per hostname" example www.example.com & www.example.org

My question is: can browsers download two components in parallel per subdomain ? www.example.com & images.example.com

回答1:

Yes they can. I've just done it myself with a Ruby on Rails application using Rails' built-in support for multiple asset hosts. They're all subdomains e.g. asset0.example.com, asset1.example.com etc.



回答2:

The rule is actually weaker, "should not download more than 2". And yes, that's per hostname. www.example.com & images.example.com are two hostnames. However, there is no guarantee that browsers will actually use 4 concurrent downloads.



标签: http browser