XF 1.4 Static Content

Robust

Well-known member
Hi,

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.php
Code:
$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:
Code:
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; }
}
 
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.
 
Set Google Analytics in XenForo panel instead of CloudFlare apps, so it's local now. Still getting this:

Code:
Serve the following static resources from a domain that doesn't set cookies:
https://static.gamingforums.net/data/avatars/s/0/258.jpg?1409631511
https://static.gamingforums.net/data/avatars/s/1/1197.jpg?1410213039
https://static.gamingforums.net/styles/default/xenforo/clear.png
https://static.gamingforums.net/styles/default/xenforo/gradients/category-23px-light.png
https://static.gamingforums.net/styles/default/xenforo/gradients/form-button-white-25px.png
https://static.gamingforums.net/styles/default/xenforo/gradients/navigation-tab.png
https://static.gamingforums.net/styles/default/xenforo/node-sprite.png
https://static.gamingforums.net/styles/default/xenforo/xenforo-ui-sprite.png
https://www.gamingforums.net/css.php?css=bb_code,login_bar,node_category,node_forum,node_list,profile_post_list_simpl…
https://www.gamingforums.net/css.php?css=xenforo,form,public&style=1&dir=LTR&d=1411330890
https://www.gamingforums.net/styles/default/xenforo/logo.png
 
Set Google Analytics in XenForo panel instead of CloudFlare apps, so it's local now. Still getting this:
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...
 
How do I do that with XenForo?
AdminCP -> Appearance -> Select your style -> Edit the template 'google_analytics' -> change this
Code:
var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_trackPageview']];
to this:
Code:
var _gaq = [['_setAccount', '{$xenOptions.googleAnalyticsWebPropertyId}'], ['_trackPageview'], ['_setDomainName', 'www.gamingforums.net']];

make sure that the domain I entered here is correct.
 
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...
 
Back
Top Bottom