1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Use cookie-free domains => config.php

Discussion in 'XenForo Questions and Support' started by Betclever, Mar 25, 2015.

  1. Betclever

    Betclever Active Member

    Hello all,

    I'm trying to optimize my Xenforo forum and when I made a test with GT Metrix, it showed me a lot of things under "use cookie-free domain".

    What must I do with this?
    I have seen a lot of posts with this but shall I add some lines in the file config.php and add a subdomain?

    If yes, can someone tell me what must I do to do this please?

    Regards,
     
  2. Coop1979

    Coop1979 Well-Known Member

    Here is a way to move your /data and /js folders to a cookieless domain (add to config.php)
    Code:
    $config['externalDataUrl'] = 'http://cdn1.yourdomain.com/data';
    $config['javaScriptUrl'] = 'http://cdn1.yourdomain.com/js';
    What items specifically was it telling you to put under a cookieless domain?
     
  3. Betclever

    Betclever Active Member

    Avatar, node icon,...
    Actually, I have chosen Google as CDN, is this a good one?

    I have just checked the box Google Ajax API CDN under "performances" on the CP but must I create an account?
    Is Google enough or must I use Amazon S3?

    Regards,
     
  4. BobbyWibowo

    BobbyWibowo Well-Known Member

    This thread is more than one month old already, but I'm quite curious as well.
    How's it on your end @Betclever ? Ticking the CDN option on Performance will only choose which CDN to use to server jQuery library. It won't affect any other files. The suggestion that Coop1979 suggested would probably solve it, but you'll need a proper CDN.
     
  5. Betclever

    Betclever Active Member

    I made 2 subdomains and added those lines into the file "config.php" and it is okay and this increased performances.
    However, I'm looking a way to increase performance for the page speed cause the loading average "first time" is more than 5 seconds and my website should be optimized but according to GTmetrix, not enough...
    Therefore, I'm checking for a good CDN and I think, I will try a free one like S3 Amazon "Free for a limit of requests" but I don't know what exactly I need cause my forum generates a lot of trafic but the total of members is poor.

    Can you advise me something?
    Regards,
     
  6. BobbyWibowo

    BobbyWibowo Well-Known Member

    You're not using CloudFlare? With CloudFlare it's impossible to get cookieless domain even by setting up subdomains though.
     
  7. Betclever

    Betclever Active Member

    No, I made 2 subdomain on my own domain but I'm looking for a good CDN.
     
  8. BobbyWibowo

    BobbyWibowo Well-Known Member

    Ah, I was actually suggesting CloudFlare. But with CloudFlare, it's impossible to get cookieless domains.
     
  9. Betclever

    Betclever Active Member

    Why?

    Is there another one which propose cookieless domains?
     
  10. BobbyWibowo

    BobbyWibowo Well-Known Member

    Any domain that's registered under CloudFlare will have CF's security cookie appended on the root domain. Meaning, access to any sub-domain will make the client send that security cookie from the root domain (so it's not cookieless). Can I serve a cookieless domain or subdomain through CloudFlare? – CloudFlare Support

    MaxCDN, KeyCDN or any other should be able to server cookieless domain as long as you're not using CloudFlare on the root domain, I believe.
     
    Betclever likes this.
  11. rafass

    rafass Well-Known Member

    Anyone know some free CDN to do this? MaxCDN and KeyCDN don't have free plans.
     
    Last edited: Aug 1, 2015
  12. Solidus

    Solidus Well-Known Member

    incapsula.com
     
    rafass likes this.
  13. rafass

    rafass Well-Known Member

    hey Solidus, thanks!
    testing incapsula ;)
     
  14. BobbyWibowo

    BobbyWibowo Well-Known Member

    Too bad Incapsula doesn't have SSL support on the free plan though.
     
    rafass likes this.
  15. Mouth

    Mouth Well-Known Member

    KeyCDN is free for 30 day trial, and only costs me around $6 per month for ~150Gb traffic.
     
    rafass likes this.
  16. Solidus

    Solidus Well-Known Member

    I really wanted to try it, but it will be at least $120 a month for me. A huge increase over the $20 I pay for Cloudflare Pro.
     
  17. Mouth

    Mouth Well-Known Member

    You would do over 3TB per month of images and javascript delivery?
     
  18. rafass

    rafass Well-Known Member

    Exactly. I'm looking other options now.
    Hello Mouth, what is the best option in the case of cookie free domain?
    Decide what type of Zone you want to use:
    • Push Zone if you want to upload the files to our CDN
    • Pull Zone if we should get the files from your origin webserver directly
    Edit, I'll try first with Pull Zone :coffee:
     
    Last edited: Aug 2, 2015
  19. BobbyWibowo

    BobbyWibowo Well-Known Member

    You should definitely use Pull Zone if you want to integrate it with XenForo. As you'll be using XenForo's config option to reroute data and js path, then uploading the files manually is not an option. Data path includes the avatar and attachments as well, then I can't simply imagine you re-uploading all of them to the CDN, lol. Especially when someone uploads new files.
     
    rafass likes this.
  20. rafass

    rafass Well-Known Member

    Great! BobbyWibowo (y) btw...99-99 now :D pm..
     

Share This Page