browser icon indicating copy to clipboard operation
browser copied to clipboard

Feature request: detect browser prefetch

Open feliperaul opened this issue 5 years ago • 2 comments

It would be nice to have browser.prefetch? that detects if the request is coming from a Omnibar prefetch that modern browsers perform.

This stackoverflow answer (https://stackoverflow.com/questions/9852257/http-header-to-detect-a-preload-request-by-google-chrome) tells that each browser vendor sends different headers, being:

  • Chrome: Purpose: prefetch
  • Firefox: X-moz: prefetch
  • Safari: X-Purpose: preview

feliperaul avatar Sep 30 '20 20:09 feliperaul

That'd be very helpful.

StanBright avatar Feb 18 '21 07:02 StanBright

As I've dig into this subject I will let here some useful documentation I've found about the issue, in case it can help anyone else:

  • https://stackoverflow.com/a/2030947 (Safari and Facebook Preview)
  • https://developer.mozilla.org/en-US/docs/Web/HTTP/Link_prefetching_FAQ#as_a_server_admin.2c_can_i_distinguish_prefetch_requests_from_normal_requests.3f

fidalgo avatar Apr 08 '21 08:04 fidalgo