For a fun project, I've been implementing a small thumbnail page on a website that provides a specially catered view for the small site previews on New Tab pages. The end goal being to present the relevant information to the user before they ever need to visit the site. (Example: a weather site frequently visited, having a thumbnail page showing today's weather, so that the user can see the relevant information at a glance).
Opera this is by detecting
X-Purpose: preview
Likewise, Safari uses the same header, but requires additional JS to maintain a consistent thumbnail.
//On primary page
if (window.navigator.loadPurpose === 'preview') { /* go to thumbnail page */ }
//On thumbnail page
if (window.navigator.loadPurpose !== 'preview') { /* return to main page */ }
I'm curious if it's possible to duplicate this effect in Chrome or Firefox (the new speed dial available in the Aurora builds)?
Note: The X-Purpose: preview
header in Chrome about 2 releases ago was a bug that was intended to be X-Purpose: instant
and does not serve this purpose.