instantpage / instant.page

Make your site’s pages instant in 1 minute and improve your conversion rate by 1%
https://instant.page
MIT License
6.04k stars 205 forks source link

Custom header #16

Closed fridzema closed 5 years ago

fridzema commented 5 years ago

Hello,

Is it possible to attach extra headers to the request? I have written my own sort of analytics where al these hover will be seen as a page visit now.

thany commented 5 years ago

You probably need to check a couple of HTTP headers.

X-moz: prefetch, X-Purpose: prefetch and Purpose: prefetch to support every browser capable of prefetching, by the looks of it.

dieulot commented 5 years ago

What @thany said. Though it seems Chrome send Purpose now and not X-Purpose anymore.

I cannot attach a specific header alas.

Note that these pages with this header might end up being visited if the user clicks on them.

thany commented 5 years ago

Just a heads up: one should probably still support X-Purpose for the time being. Other Blink-based browsers may be outdated, such as Android Webview, Safari, Samsung Internet, Opera, and likely more.

fridzema commented 5 years ago

Thanks! For now i check on all those headers!