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

XF 1.4 Static Content

Discussion in 'Troubleshooting and Problems' started by Robust, Sep 21, 2014.

  1. Robust

    Robust Well-Known Member


    I have https://static.gamingforums.net for static content, and my actual site is set to https://www.gamingforums.net which I'd assume would work, but it doesn't.

    Pingdom and Google Developers tests say that cookies are being set on static.gamingforums.net, I'm not sure why? The changes I made are:

    $config['externalDataUrl'] = 'https://static.gamingforums.net/data';
    $config['javaScriptUrl'] = 'https://static.gamingforums.net/js';
    And obviously to the style in Style Properties.

    Also, apparently leverage browser caching isn't working either. My static nginx site block is the following:
    server {
            listen 443 spdy;
            root /var/www/gamingforums;
            server_name static.gamingforums.net;
            ssl on;
            ssl_certificate /my/ssl/cert;
            ssl_certificate_key /my/ssl/key;
            ssl_protocols SSLv3 TLSv1;
            ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
            location / {
                    deny all;
            location ~ /data { expires 10d; }
            location ~ /styles { expires 10d; }
            location ~ /js { expires 10d; }
  2. Mike

    Mike XenForo Developer Staff Member

    The only cookies I see are the ones set by Google Analytics.

    And it does look like the 10 day expiration is being used as well.
  3. Robust

    Robust Well-Known Member

    Set Google Analytics in XenForo panel instead of CloudFlare apps, so it's local now. Still getting this:

    Serve the following static resources from a domain that doesn't set cookies:
  4. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    That's because google is setting the cookies for your domain as .gamingforums.net, which is making it global for all your sub domains... I don't know if you can manually set analytics to only create cookies for www.gamingforums.net

    Another way is to get a new domain to serve the static contents...
  5. Robust

    Robust Well-Known Member

  6. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    AdminCP -> Appearance -> Select your style -> Edit the template 'google_analytics' -> change this
    var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_trackPageview']];
    to this:
    var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_trackPageview'], ['_setDomainName', 'www.gamingforums.net']];
    make sure that the domain I entered here is correct.
  7. Robust

    Robust Well-Known Member

    Changed, still being an issue, not sure?
  8. Robust

    Robust Well-Known Member

    Still kinda an issue.
  9. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    hmmm... I am out of ideas... so... how are using checking for cookies? any online tool and stuff?
  10. Robust

    Robust Well-Known Member

  11. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    ahh... sorry couldn't find any solution... thought you shouldn't worry about too much about it...

    another thing you can try is consult to Google Analytics support... by posting it on their support forums.

    I tried by using the code GA gives when creating an account but still no change...

Share This Page