Support

Admin Tools

#27609 Cookieless subdomain and Admin Tools non-www to www

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by menolo on Thursday, 18 May 2017 12:22 CDT

menolo
 I'm trying to set up a cookieless (sub)domain for images, css and js on cookieless.example.com (using JCH optimize pro).

Now I'm running into an issue whit non-www to www enabled in Admin Tools' htaccess maker.

This causes cookieless.example.com to redirect to www.cookieless.example.com.

Is there a way to work around this so there is no www redirect for the cookieless subdomain?

nicholas
Akeeba Staff
Manager
No, you can't do that. Since both subdomains are served by the same content folder Apache will read the .htaccess file and apply it in both subdomains.

FWIW trying to serve static content from a cookieless subdomain is largely a waste of time unless your clients are on very high latency and slow connections. Even someone on an airplane (slow, spotty, satellite Internet) won't really benefit from it.

Your bottleneck is not in the 10 msec you'll save (at best!) with a cookieless domain. DNS resolution will take longer than that, try hosting your DNS on dyn.com or Amazon Route 53 to see a real difference. The Apache MPM you're using -or whether you're using NginX in front or instead of Apache- makes more of a difference. Static content being delivered from a server that's two continents and an ocean away from your client makes a massive difference (about 200 msec from Cyprus to California and then back), use a CDN to mitigate that. Do you have a complex template by a reputable template provider? It's adding one to two orders of magnitude more page load time than what you'll save with a cookieless domain. Use a lean, handcoded template without a template framework. Even the RegEx you're using to convert the static content links to point to the cookieless domain take more time than what you earned by not sending cookies when requesting static content. Look at more pragmatic approaches to increasing your site's speed.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

menolo
Hey Nicholas,

I understand.
- I'm on cloudflare's DNS (and CDN, caching)
- Using http/2
- Not using any template frameworks
- Combining JS/CSS with JCH optimize (not sure if this is even necessary due to http/2)

My sites are quite fast already, I was just trying to find more optimization where possible. You're right, I shouldn't invest more time into this, it's not worth it.

Thanks for your extensive answer!

Wim

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!