Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. The Misalignment Is Within: Why Mathematics Must Embrace the AI Paradigm(medium.com/b1nj0y)
    discuss
  2. OSS Author of Guake, HTTPretty, Lettuce and Sure is unemployed and needs help(twitter.com/gabrielfalcao)
    discuss
  3. Chrome Extension Job Alerts(talentize.com)
    discuss
  4. The Death of Reading (With James Marriott) [audio](econtalk.org)
    discuss
  5. Graph Technology Roundup – August 2026(gdb-engines.com)
    discuss
  6. Why China Can't Innovate (2014)(bambooinnovator.com)
    discuss
  7. An Interview with Rich Jaycobs(sfcompute.com)
    discuss
  8. The Complete History of the Elves of Middle-Earth [video](youtube.com)
    discuss
  9. A Key Safety Feature Shipped in the May OpenTofu Release(masterpoint.io)
    discuss
  10. Show HN: A game about fake news and memes(unspin.app)
    1comments
  11. Rendering pull requests in the GitHub Copilot app(github.blog)
    1comments
  12. Australia says OpenAI agent hacked into government website(channelnewsasia.com)
    discuss
  13. Pentagon Investigating How F-35 Fighter Jet Parts Bound for US Were Diverted(military.com)
    2comments
  14. AP: Avoid language that gives [AI] human characteristics(twitter.com/apstylebook)
    discuss
  15. Qubits on NonQuantum HW Tested(laurinseclab.substack.com)
    discuss
  16. Liquid Network Security Incident Assessment(blockstream.com)
    discuss
  17. FLAWED's Flaws and What This Means for Industry Research(suhacker.ai)
    1comments
  18. Geminigravit Core: De la teoría estática(gemini.google.com)
    discuss
  19. We used an AI agent to fix an open-source bug. Someone asked to ban us(github.com/saulpw)
    15comments
  20. Shadow roots, explained with live examples(simonwillison.net)
    discuss
  21. Show HN: Does per-step reasoning effort save money in Claude Code?(github.com/ifoster01)
    discuss
  22. Show HN: ChaosTree – Cache-Aware Java NavigableMap and NavigableSet Library(github.com/chaos-vy)
    discuss
  23. Show HN: Posting Puzzle – A Game Made of Post's Correspondence Problem(mametter.itch.io)
    1comments
  24. AI startups with hyper ARR growth – what's happening inside these companies?
    discuss
  25. Nesbox: A fast MicroVM with GPU sharing(github.com/nestrilabs)
    discuss
  26. Using my transit card data to create a year in review experience(cailinpitt.com)
    discuss
  27. Virtio-nvgpu: Near-native Nvidia GPU access inside a KVM guest(github.com/nestrilabs)
    discuss
  28. Scientists build most accurate atomic clock(phys.org)
    1comments
  29. AI Has Cracked the Most Diabolical Problems in Math. Why Can't It Solve Chess?(wsj.com)
    discuss
  30. lm-detector: Model fingerprint detection on Web and CLI(github.com/ikaleio)
    discuss

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

76 pointsby 3h agoblog.cloudflare.com
12 comments
2h agoHN ↗

I've been wanting this from Cloudflare for years.

The classic problem here is if you do that thing where user agents that send "accept: text/html" get HTML, while user agents that don't get JSON or some other format.

This used to be impossible to deploy behind Cloudflare caching, because they ignored the Vary header on anything other than images - so you risked caching the JSON version and then serving it up to someone who was expecting HTML.

(Independent of the Cloudflare feature I ended up deciding never to use that pattern, because I prefer having URL that predictably returns HTML or JSON - I add a .json suffix to my apps to serve JSON instead.)

2h agoHN ↗

Nice to see. I’ve used vary to quite a bit of success on CloudFront back in the day.

I actually assumed when I started using Cloudflare that it did have vary support and it led to a serious bug in my sass app at the time.

2h agoHN ↗

I honestly thought they would never ship this. Holy hell this has been a long time coming.

Actual real content negotiation in 2026. Never thought I'd live to see the day.

2h agoHN ↗

"If the origin response does not include a Vary header, Cloudflare caches the response normally"[1]

"If one response omits it, Cloudflare could cache that response without the variance needed to keep it isolated."[2]

Will that non-Vary cache object front-run any Vary-segmented cache objects?

If so, probably worth adding a snippet rule to ensure every response has a Vary header?

1: https://developers.cloudflare.com/cache/concepts/vary/#how-v...

2: https://blog.cloudflare.com/vary-support/#how-a-response-mov...

1h agoHN ↗

finally. now maybe they'll have time to implement a working unsubscribe on their marketing emails.

1h agoHN ↗

Turns out their marketing can get to you through HN posts…

1h agoHN ↗

I had not actually realized what a mess Vary is.

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

1h agoHN ↗

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.

7m agoHN ↗

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.

58m agoHN ↗

If this surprises you, remember that Cloudflare doesn't cache HTML by default.

11m agoHN ↗

They can't do that because a CMS under Cloudflare needs to be configured to bust the Cloudflare cache when content is edited or the user will see cached content after they edit a page.

10m agoHN ↗

OTOH a CMS that doesn’t send correct cache headers is already broken