Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Meta VR Glasses(meta.com)
    92comments
  2. Linux support is coming to Snapdragon X2 Series(qualcomm.com)
    57comments
  3. Claude discovers a novel enzyme system with CRISPR-like repeats(anthropic.com)
    512comments
  4. VSCode's SSH Agent Is Bananas (2025)(fly.io)
    79comments
  5. ArXiv receives multiyear commitments to support it as an independent nonprofit(arxiv.org)
    6comments
  6. We just shipped support for the ugliest part of HTTP: Vary(cloudflare.com)
    8comments
  7. The "Windows XP Box" (2003)(mini-itx.com)
    5comments
  8. Fixing the Portobello Police Station Clock(pointinthecloud.com)
    85comments
  9. Mercury 2.5 LLM hits 770 tokens per second(artificialanalysis.ai)
    15comments
  10. LensVLM: Compressing long context as images, expanding only relevant pages(huggingface.co)
    6comments
  11. Italian parliament votes for return to nuclear energy(apnews.com)
    367comments
  12. The mystery animal on an ancient god's head(signoregalilei.com)
    14comments
  13. A brief history of Windows scroll bar shortcuts(devblogs.microsoft.com/oldnewthing)
    47comments
  14. Gemini 3.8 text-to-speech(blog.google)
    121comments
  15. Making Tailscale Faster(tailscale.com)
    19comments
  16. Radicle: Disclosure of Vulnerability in the Network Protocol(radicle.dev)
    47comments
  17. The Curious Power of Punctuation(newyorker.com)
    3comments
  18. Tokens too cheap to meter(jyn.dev)
    179comments
  19. Augustofaces: Pareidolia Fine Art(augusto.at)
    discuss
  20. A refined phylochronology of the second plague pandemic in Western Eurasia(pnas.org)
    discuss
  21. I don't want the details(michaelheap.com)
    193comments
  22. Swap, ZRAM, Zswap and Hibernate on NixOS(matthewbrunelle.com)
    6comments
  23. Z80 REPL (2018)(abagames.github.io)
    18comments
  24. Claude Code reads AGENTS.md only when telemetry is on [fixed](szypowi.cz)
    254comments
  25. Show HN: I built a post-mortem debugger for native Windows x64/x86 crashes(forensicdbg.com)
    4comments
  26. 28% of job postings on company career sites have been open over 90 days(unlisted.careers)
    296comments
  27. Once Claude can measure something, it can make it faster(claude.dev)
    100comments
  28. Seattle City Council votes to ban surveillance pricing in sale of groceries(consumerreports.org)
    194comments
  29. GPT-6 Sol and Luna(openai.com)
    822comments
  30. QuestDB (YC S20) Is Hiring a Sales Engineer(questdb.com)
    discuss

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

57 pointsby 2h agoblog.cloudflare.com
8 comments
1h 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.)

1h 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.

1h 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.

1h 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...

30m agoHN ↗

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

26m agoHN ↗

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

11m agoHN ↗

I had not actually realized what a mess Vary is.

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

3m 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.