Magento Forum

   
How to call CSS and JS from a sub-domain - to make loading faster? :)
 
lisali
Enthusiast
 
Avatar
Total Posts:  888
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
smile smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
lisali
Enthusiast
 
Avatar
Total Posts:  888
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