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.
As far as I can tell, both Chrome and Firefox Speed-dial thumbnails are only populated when you visit a page - i.e. they're taken from the normal browsing context, with normal headers, rather than being independently queries in their own right.
You can test this a number of ways - I haven't spent long testing it, and you may have different version(s) of Firefox/Chrome than I do so you may see different results.
In Firefox - the above works, but you can also try out thumbnail generation directly using the moz-page-thumb:// URL protocol:
moz-page-thumb://thumbnail?url=http%3A%2F%2Fstackoverflow.com%2Fq%2F10369905%2F210865"
(please do test in whatever versions you're running as I'm curious about this question too - my research sofar is disappointing, but possibly in future ...)
Other references:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With