Note: the following scURIple (generic URI counterpart to javascript: scriplets) is stateless and thus is unrestricted by origination policies.
data:text/html;charset=utf-8,
<html><script>
uri='data:text/html;charset=utf-8,<\html><\script>alert(\'click to finish load\')<\/script><\/html>';
</script>
<a href="javascript:
window.open(uri,'_blank') .
addEventListener( 'load',Function('alert(Date.now()-'+Date.now()+')'), false);">
one method </a><p>
<a href="javascript:st=Date.now();
window.open(uri,'_blank') .
addEventListener( 'load', function(){alert(Date.now()-st)}, false);">
another way</a>
</html>
The numeric results are in msec.
Same site origin and cross-site scripting policies apply. For example, if uri='http://www.google.com'
then the page above must be loaded into a window already showing a page from www.google.com
.
tested using:
window.navigator.userAgent=
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
(Splashtop-v1.2.17.0)