Coder Social home page Coder Social logo

ETag header about ga-beacon HOT 4 CLOSED

ArtemGr avatar ArtemGr commented on May 29, 2024 1
ETag header

from ga-beacon.

Comments (4)

igrigorik avatar igrigorik commented on May 29, 2024 3

FWIW, for the purpose of our use case.. we don't want the response to ever be served from cache. As such, using no-cache and unique ETag on each request is both simplest and easiest.

from ga-beacon.

igrigorik avatar igrigorik commented on May 29, 2024

👍

Any chance you'd be up for putting together a PR? :)

from ga-beacon.

ArtemGr avatar ArtemGr commented on May 29, 2024

Any chance you'd be up for putting together a PR? :)

So far it's just an idea, one would have to experiment on it to see if it changes anything. For example, the beacon might change ETag periodically, by feeding the current second (or unix_time_seconds() / X) into ETag. It would be interesting to see if that'll do anything to the beacon-generated AdSense stats.

On one hand, ETag shouldn't do anything in presence of Cache-Control: no-cache. On the other hand, we have statements from GitHub programmers (?) that ETag is needed in order not to screw things up. It's weird, but maybe it's real. Maybe the lack of ETag is screwing no-cache because of some non-standard caching.

Another thing to try would be Cache-Control: must-revalidate with a changing ETag, instead of just Cache-Control: no-cache. It might use a different code path in github/fastly and so improve the amount of requests that goes directly to the beacon instead of being cached.

That said, I don't have the infrastructure (Go compiler, a working app-engine instance of the beacon) to work on it properly. Dubbing in that would be supper inefficient. Like nine times to one, where nine is the time to figure out the environment and one is the time to work on the problem.

from ga-beacon.

igrigorik avatar igrigorik commented on May 29, 2024

Resolved via #54.

from ga-beacon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.