datasette #3046: Don't serve link: rel=next HTTP headers to Firefox for HTML pages
· Source: Simon Willison
The author noted in Firefox’s network panel that loading a Datasette‑generated table page triggered a prefetch request for the next results page. This occurs because Datasette includes a link header with rel="next" in the HTTP response, telling the browser the URL of the following page. Firefox interprets that header as a cue to pre‑fetch the resource, causing the client to download data that would normally be requested only when the user clicks “next.” Since most visitors do not use that navigation, the server ends up generating and sending a full page that is then discarded, wasting bandwidth and processing resources.
This is not a new issue; Firefox has had an open bug report on prefetching for over twenty years, and the author himself wrote about it in 2002. The takeaway is that, to avoid unnecessary load, Datasette should omit the link: rel="next" header when the response is HTML and the client is Firefox.
The story is relevant because it exposes an unexpected interaction between a data publishing tool and browsers, which can impact the efficiency of servers delivering large volumes of information. Identifying and correcting such behaviors helps reduce resource consumption and improve end‑user experience.
Read the original article on Simon Willison
This summary is an informational synthesis produced by dataqbs.com. All rights to the original content belong to its author and the cited media outlet. We act solely as curators of technology news and claim no authorship.