4 ms·
Apparently they do, they send X-Purpose: instant (http://www.google.co.uk/chrome/intl/en-GB/webmasters-faq.html#instant http://www.google.co.uk/chrome/int
by icebraining 15y ago
Apparently they do, they send
X-Purpose: instant
(http://www.google.co.uk/chrome/intl/en-GB/webmasters-faq.html#instant http://www.google.co.uk/chrome/intl/en-GB/webmasters-faq.htm...)
- paraschopra 15y agoBut 3rd party JavaScript libraries (like GA or ours) cannot read such headers and will invariably get executed. How would Google Analytics recognize and discard such irrelevant requests?
- mike-cardwell 15y agoWill the javascript even be executed during this "pre-rendering" process? It's the people with server side analytics that are going to be affected most by it.
- icebraining 15y agoI dunno, use the Page Visibility API[1]? [1]: http://www.w3.org/TR/2011/WD-page-visibility-20110602/ http://www.w3.org/TR/2011/WD-page-visibility-20110602/
- mike-cardwell 15y agoThat's good to know. That can be used to do what I want.
- alexchamberlain 15y agoTo disable this behaviour, Detect this and return an HTTP 403 ("Forbidden") status code. Then you will blacklisted client side. I'm not sure I like this, since it will slow down your site until the blacklist gets cleared up if the user accesses a page they are forbidden for.
- icebraining 15y agoYeah, but on the other hand it's hard to find an appropriate status code. Since prefetching is a common feature in many browsers they should agree on a new code, there are still plenty of 4XX available.