• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • 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

a legacy reborn

Well-known member
#24
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 :).
 

glorify

Well-known member
#25
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.
 

glorify

Well-known member
#31
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?
 

Deebs

Well-known member
#36
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.
 

Jaxel

Well-known member
#39
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?
 

Deebs

Well-known member
#40
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.