Datasette 修复向 Firefox 发送 rel=next 头导致的预取问题
原标题:datasette #3046: Don't serve link: rel=next HTTP headers to Firefox for HTML pages
AI 摘要
Simon Willison 发现 Datasette 表格页面向 Firefox 发送 link: rel=next HTTP 头,导致浏览器预取下一页数据,造成不必要的流量和服务器渲染开销。他提交了 datasette #3046 修复,停止向 Firefox 的 HTML 页面发送该头。该行为源于 Firefox 一个已开放 24 年的 issue,而他本人 2002 年的博客文章也曾抱怨过这一特性。
正文节选
7th November 2026 - Link Blog datasette #3046: Don't serve link: rel=next HTTP headers to Firefox for HTML pages. I was looking at the Firefox network panel today when I noticed that requests to a Datasette table page were triggering an HTTP prefetch to the next page of rows in that table. This was happening because Datasette pages serve an HTTP link header like this: link: <https://latest.datasette.io/fixtures/compound_three_primary_keys?_next=a%2Cd%2Cv>; rel="next" This is bad. A tiny fraction