hi at2001;
the reason is AO only aggregates if the domain matches. as static.raspberry.tips <> raspberry.tips <> cdn.raspberry.tips, the files on static and cdn are not aggregated.
hope this clarifies,
frank
Thread Starter
at2oo1
(@at2oo1)
Thanks for that information, i used subdomains to speed up loading of images and static ressources because many browsers have a limit of 8 parallel connections per domain for getting ressources from the webserver.
I love autoptimize, maybe you want to add the support for subdomains in the future.
the reason why AO does not take other domains into account is that internally it translates the URL’s to paths on the local filesystem. this works 100% for the domain WP is running on, but cannot be guaranteed to work for other domains (even if sub-domains).
but … as AO aggregates multiple CSS- (and JS-)files into just a couple, spreading those files over multiple domains is (less) relevant anyway. So the best approach would be to disable cdn/ static domains for CSS & JS to start with. If you want you can tell AO to switch domains to static using the CDN-config.
Hope this helps,
frank