adamaveray The Internet Archive's Wayback Machine has a number of APIs to confirm whether a page has been archived or not. It would be nice if Kagi used this to disable the "Open result in Web Archive" link when a page has not been archived to prevent clicking the link only to be disappointed.
Vlad adamaveray Checking the API would slow down the initial popup plus would not work for users not using JS, and for those reasons is probably not worth it?
adamaveray Vlad I guess I was imagining the "is archived" status would be stored/refreshed at crawl time so there wouldn't be a request to the Wayback Machine API for each click. Of course there would be the chance that between Kagi crawling a page and the page being displayed in a search result the Wayback Machine could have completed its first archive of a page but that seems like a very narrow edge case. To simplify things further on Kagi's end it could even be implemented in a way that Kagi only stores an "is archived" status per domain which would catch the vast majority of situations where an unarchived page's archive link is displayed by Kagi. The Wayback Machine's CDX server API looks very powerful and provides the ability to check if any page on a domain has been archived via e.g. archived: http://web.archive.org/cdx/search/cdx?url=example.com&matchType=domain&limit=1 vs not archived: http://web.archive.org/cdx/search/cdx?url=nonexistent.example.com&matchType=domain&limit=1 (or better yet http://web.archive.org/cdx/search/cdx?url=example.com&matchType=domain&filter=statuscode:200&filter=!original:.*/robots\.txt$&limit=1 to restrict to success responses and omit robots.txt entries which are showing up for some domains like example.localhost), so that could be a good option to use if checking each individual indexed page is too bandwidth intensive.
Vlad adamaveray Kagi does not crawl the entire web, so there would still be (vast number of) pages where we would have to perform this check during run-time. Doing it on doman level also would not be reliable and pages on one domain could have very different archival status.
ntt No, it is very useless to remove that button. Instead, there can be a small icon, if it is in the archive or not.