• 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

ChemicalKicks

Well-known member
#43
Right I'll be having a crack at this later, moved to cloud based hosting and want to optimise as much as possible.

I've got static.the-sps.org set up and pointing to my public

What URL would I stick in the style image path

Tried static.the-sps.org/styles/default and that doesn't work.

Um confused about serving up the js, where do I move the files to?
 

Shamil

Well-known member
#44
Right I'll be having a crack at this later, moved to cloud based hosting and want to optimise as much as possible.

I've got static.the-sps.org set up and pointing to my public

What URL would I stick in the style image path

Tried static.the-sps.org/styles/default and that doesn't work.

Um confused about serving up the js, where do I move the files to?
Try to have 2 or 3 domains for static (js) - but take care that it means more DNS lookups - so I suggest using a fast DNS server, if you go down this route.
 

Jaxel

Well-known member
#45
I'm still confused on how this stuff works... Lets say I add to my config...
Code:
$config['externalDataUrl'] = 'http://cdn.8wayrun.com/data';
$config['javaScriptUrl']  = 'http://cdn.8wayrun.com/js';
I understand that I simply upload my JS to the /js folder... but the /data folder isn't uploaded by me... its data generated by XenForo itself. How does XenForo know to put the files (attachments, avatars, etc) in cdn.8wayrun.com/data. In fact, how would it even do it at all? If the CDN is a different server, it needs login credentials and path information... which is not included here. So how does this work?
 

DRE

Well-known member
#47
I've only been a webmaster for a year now. No previous experience. Just learning as I go. This was one thing that had stumped me when I initially started using www.Cloudflare.com and running my vB4 site through www.webpagetest.org to see what I could do to speed it up. Several people have tried explaining how to set up a cookie-less domain using sub-domains to me before but it still confusing. It's relieving to see even coders getting a little stumped over cookies.

From what I can recall being told by various people, you can set up a cookie-less domain as a subdomain only if you installed your forum or site at http://www.yoursite.com instead of http://yoursite.com Then whenever you want to host static images, do it from a http://static.yoursite.com folder. Then point a CDN to that http://static.yoursite.com folder.
 

HydraulicJack

Well-known member
#48
I'm wanting to add a second super admin to my config.php file.
Which Plain Text Encoding should I use? Unicode (UTF-16), Unicode (UTF-8), or ???
Thanks!
 

Jaxel

Well-known member
#51
I'm still confused on how this stuff works... Lets say I add to my config...
Code:
$config['externalDataUrl'] = 'http://cdn.8wayrun.com/data';
$config['javaScriptUrl']  = 'http://cdn.8wayrun.com/js';
I understand that I simply upload my JS to the /js folder... but the /data folder isn't uploaded by me... its data generated by XenForo itself. How does XenForo know to put the files (attachments, avatars, etc) in cdn.8wayrun.com/data. In fact, how would it even do it at all? If the CDN is a different server, it needs login credentials and path information... which is not included here. So how does this work?
I believe my previous questions have still yet to be answered...
 

DBA

Well-known member
#55
I believe my previous questions have still yet to be answered...
Like robdog said, get a CDN that "pulls" (mirrors). I use www.maxcdn.com.

Easy way:
Create a pull zone with the origin URL as www.8wayrun.com
Replace the main domain part (www.8wayrun.com) of all your static content URLs with the temporary URL they give you (cdn.8wayrun.netdna-cdn.com)

Better way:
Create a pull zone with the origin URL as www.8wayrun.com
Get a simple/small domain name (8wr.co) and create a few sub-domains a.8wr.co c.8wr.co i.8wr.co
CNAME all your new sub-domains to the temporary URL they gave you.


I have i.dba.co for all my images, a.dba.co for all attachments/avatars, c.dba.co for CSS/JS.