Chrome 118 History API: maxResults cap limits pagination?
0 reputation · 06 Apr 2024, 01:52 UTC
Issue with maxResults in Chrome 118
The Chrome History API’s chrome.history.search method accepts a maxResults parameter intended for pagination. In Chrome 118, requests with maxResults greater than 1000 consistently return only 1000 entries, indicating an internal cap. The API documentation does not specify a maximum value, and the behavior of startTime as inclusive or exclusive is also unclear, leading to potential off‑by‑one errors when attempting to page beyond the cap.
Developers need a reliable way to enumerate a large history dataset. When the total number of entries exceeds 1000, the current cap prevents complete retrieval, and the interaction between maxResults and startTime is not well documented. This uncertainty hampers the design of robust pagination logic for Chrome extensions that rely on the History API.
Unresolved Questions
- Is the 1000‑entry limit a hard cap in Chrome 118, or is it subject to change in future releases?
- What is the documented maximum value for
maxResults, if any, and how does it interact withstartTimepagination? - Should developers rely on
startTimefor pagination beyond the 1000‑entry cap, or is there an alternative approach recommended by Chrome?