Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One odd thing I bumped into is Google speed suggestion "complaining" about leveraging browser caching, but it reports Google Analytics as an offender :-/

    https://www.google-analytics.com/plugins/ua/linkid.js (60 minutes)
    https://www.google-analytics.com/analytics.js (2 hours)


This has been the case for what feels like forever now, and Google have on several occasions clarified they have no intention of changing the cache time on these files to "fix" the Page Speed score result for sites that use Google Analytics.

I personally find that most of the workarounds for this are usually more technically offensive than living with a marginally lower score on this often somewhat arbitrary test.


    location /analytics.js {
        proxy_pass https://www.google-analytics.com;
        expires 1d;
    }


You might serve an outdated file and lost a day worth of analytic records as a result.


Never seen that happen before - but you have a point assuming google implements a drastic change.


I address that at the bottom of this post. If they're gonna contradict themselves than we might as well circumvent that.


Nice 'diesel gate' style hack.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: