A secured websites homepage consists of 50 https requests, totalling 400kb with a performance grade of 98 (Google PageSpeed) all from 1 host at the moment: https://www.foo.com/
My htacces makes all non-www to go to www and all http to go to https, so the dominans become all https://www.
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ https://www.szzz.nl%{REQUEST_URI} [R=301,L,NE]
Now, the only "limitation" to the speed is that the waterfall processes the 50 requests from the html in the same single que:
https://www.foo.com/....php
https://www.foo.com/....css
https://www.foo.com/....js
https://www.foo.com/....jpg
While I would like to parallelize
and spread my static components in my html to four different subdomains for example:
https://www.foo.com/...php
https://sub1.foo.com/...css
https://sub2.foo.com/...js
https://sub3.foo.com/...jpg
My hoster enabled a subdomain wildcard for me, now any and all subdomains work https://anything.foo.com
but these cost a redirect each while I would like to have the static contents loaded directly through https://[sub].foo.com
without any redirects.
How to achieve this for my four subdomains to bypass the redirect and fetch the static concents as fast as possible using just htaccess? Thank you!
Related:
Maximum Parallel HTTP connections per browser using subdomains
Can browsers download 2 components in parallel per subdomain