• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Xenforo enabling CDN for static content and javascript - DONE

I'm using MaxCDN. Any suggestions on edits to the /library/config.php file to allow my CDN to handle various javascripts.
Are we able to use maxCDN in the latest version? (currently 1.0.4)
I have a free maxcdn account, might as well use it if I can :)
 
I just checked one of mine and I add my stuff after
PHP:
$config['superAdmins'] = '';
I don't see how it should make a difference, did you possibly mess up the char encoding? I have had that happen to me more than once and it messes things up :).
 
I just checked one of mine and I add my stuff after
PHP:
$config['superAdmins'] = '';
I don't see how it should make a difference, did you possibly mess up the char encoding? I have had that happen to me more than once and it messes things up :).
Don't think so. Tried placing it where you had it and did the same thing, even on the default style.
 
The requested URL /static/js was not found on this server.
When I set up that subdomain, I forgot I didn't need to use the static in the address. Thanks so much. Anything else I have to do to set up a cookie free domain other than move the js and style folders and set the image paths?
 
What is the advantage of serving data/js from a CDN? Especially if the CDN is on the same server?
 
What is the advantage of serving data/js from a CDN? Especially if the CDN is on the same server?

For one, if you change the TLD you instantly get cookieless serving which speeds up transfers. You can also use a subdomain to achieve the same but you may not be able to achieve a cookieless domain due to say stuff like google analyitcs (unless you specifically set it to a subdomain).

Secondly you may decide to run another instance of your webserving software which is optimised for serving static hardly ever changing files without the overhead of all the additional modules you may be running on your main webserver.
 
You can do that without modifying your main website. Not sure if you can serve styles from a CDN yet.
 
You can do that without modifying your main website. Not sure if you can serve styles from a CDN yet.
You definately can... but I'm still a bit confused... If I add the following lines to my config:
Code:
$config['externalDataUrl'] = 'http://cdn.8wayrun.com/data';
$config['javaScriptUrl']  = 'http://cdn.8wayrun.com/js';
The system will tell the website to look for the data/js folders in the appropriate areas...

But there is an obvious issue... The /data folder contains /attachments and /avatars. How does the system know where to save those files as needed as they are created by users?
 
You definately can... but I'm still a bit confused... If I add the following lines to my config:
Code:
$config['externalDataUrl'] = 'http://cdn.8wayrun.com/data';
$config['javaScriptUrl']  = 'http://cdn.8wayrun.com/js';
The system will tell the website to look for the data/js folders in the appropriate areas...

But there is an obvious issue... The /data folder contains /attachments and /avatars. How does the system know where to save those files as needed as they are created by users?

I believe that Xenforo knows internally where the data folder and for all uploads uses the internal setting, for any content to be served from the data folder, ie attachments, avatars etc, it uses the setting you applied in the config file.
 
Top Bottom