Nová ukázka
Reset
Načíst z URL
Uložit a získat odkaz
Vztahuje se k…
Nevyplňujte
Napiště „nejsem robot“
▶
Přepnout zobrazení
Výsledek
<span id="result"></span>
HTML
Autoformát
Standardní režim
Mobilní zobrazení
CSS
Autoformát
CSS reset
Až na konci
function microtime (getAsFloat) { var s var now if (typeof performance !== 'undefined' && performance.now) { now = (performance.now() + performance.timing.navigationStart) / 1e3 if (getAsFloat) { return now } // Math.round(now) s = now | 0 return (Math.round((now - s) * 1e6) / 1e6) + ' ' + s } else { now = (Date.now ? Date.now() : new Date().getTime()) / 1e3 if (getAsFloat) { return now } // Math.round(now) s = now | 0 return (Math.round((now - s) * 1e3) / 1e3) + ' ' + s } } var obrazek = new Image(); obrazek.addEventListener('load', function () { var imageSize = 10174706; document.getElementById('result').innerHTML = imageSize / 1000 / (microtime(true)-start) + ' kB/s'; }); var start = microtime(true); obrazek.src = 'https://upload.wikimedia.org/wikipedia/commons/f/ff/Pizigani_1367_Chart_10MB.jpg';
J
ava
S
cript
Autoformát
jQuery
Umístění JS
window.onload
</head>
</body>