datasette #3046: Don't serve link: rel=next HTTP headers to Firefox for HTML pages

蓝旅人AI 前沿📡 Simon Willison's Weblog2026-11-08713 阅读💛 239 收藏

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 of the visitors to one of those pages will click the "next" link, which means their browser is fetching unnecessary data and the Datasette server is having to render an entire page that then gets thrown away.

I dug in and learned that Firefox has an issue that has been open for 24 years about this behavior...

And one of the early comments on that issue links to my blog post from 2002 complaining about this feature. I hadn't just forgotten that I had written about it, I had forgotten the feature entirely!

文章评论(12)

山问津7 天前

这篇文章分析得很透彻,收藏了!

回复
逐光而行7 天前

实测过类似工具,作者说的基本属实。

回复
青柠微凉7 天前

赞同,实践出真知。

回复
风拾光7 天前

这个观点很中肯,深有同感。

回复
雪影7 天前

收藏了,以后慢慢研究。

回复
杨丽华7 天前

楼主辛苦了,内容很有参考价值。

回复
北岛渔夫7 天前

点赞,必须点赞

回复
蓝光7 天前

刚好最近在找这方面的资料,太及时了。

回复
空向阳7 天前

有没有更详细的教程,期待后续。

回复
月沐雨7 天前

这个观点很中肯,深有同感。

回复
一个橘子7 天前

这篇文章分析得很透彻,收藏了!

回复
曹浩7 天前

作者写得真不错,学到了不少。

回复