Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to call CSS and JS from a sub-domain - to make loading faster? :)
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Hello,

In order to increase the 2 connections per request from the same domain limit, one can set up a subdomain and point the CNAME record back to the main domain.

Now, I would like to call the JS and CSS files from sub.domain.com, instead of domain.com

I believe the code for that is in:

app/code/core/Mage/Page/Block/Html/Head.php

around line 84, where it says:
$baseJs = Mage::getBaseUrl(’js’);

Am I right? Now, what would I need to do here to make my JS and CSS files load from the sub-domain?
I have tried a couple of things, but they have failed.

Many thanks for any suggestions!
Lisa
smilesmile

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  889
Joined:  2008-04-28
London, UK
 

Any suggestions on how to do this? Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top