‹ BackHN Continuity

Thread

We just shipped support for the ugliest part of HTTP: Vary

150 points · 40 comments · thisisfatih

  1. jrochkind1 · · focus · HN ↗
    I had not actually realized what a mess Vary is.

    Wow, sometimes I think it's amazing the web works at all!

    1. saltcured · · focus · HN ↗
      It pains me to think about the important ones like varying on session cookie and authorization headers, and how badly some middleware can confuse things.

      We generate custom content for a given authentication context. We definitely want caching at the user agent, but we want the cache keyed by the authenticated identity. Otherwise something like logging out and logging in as a different identity can produce monstrously confused results when an SPA or similar mixes some cached and some fresh responses into one page.

      1. rmunn · · focus · HN ↗
        Cache invalidation, one of the two hard problems in computer science.

        I'm sure most people here already knows the joke, but for the lucky 10,000, here's the full joke:

        There are only two hard problems in computer science. Naming things, cache invalidation, and off-by-one errors.

        1. onestay42 · · focus · HN ↗
          And, for those who don&#x27;t know who the lucky 10,000 are, <a href="https:&#x2F;&#x2F;xkcd.com&#x2F;1053&#x2F;" rel="nofollow">https:&#x2F;&#x2F;xkcd.com&#x2F;1053&#x2F;
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.