Code de test
http://jsbin.com/dipijeqi/11
Effet:
chrome
La copie de code est la suivante:
window.devicepixelratio: 2 (précis)
screen.devicexdpi / screen.logicalxdpi: nan
window.outerwidth / window.innerwidth: 2
document.DocumentElement.offsetheight / window.innerheight: 0.020618556701030927 (avec corrélation)
window.top.outerwidth / window.top.innerwidth: 2
ff
La copie de code est la suivante:
window.devicepixelratio: 1.5 (précis)
screen.devicexdpi / screen.logicalxdpi: nan
window.outerwidth / window.innerwidth: 1.0114583333333333333333
document.DocumentElement.offsetheight / window.innerheight: 0.023391812865497075 (avec corrélation)
window.top.outerwidth / window.top.innerwidth: 1.0114583333333333333333
IE 8
La copie de code est la suivante:
window.devicepixelratio: non défini
Screen.Devicexdpi / Screen.LogicalXDPI: 1.5416666666666667 (autour de précis)
window.outerwidth / window.innerwidth: nan
document.documentElement.offsetheight / window.innerheight: nan
window.top.outerwidth / window.top.innerwidth: nan
IE11
La copie de code est la suivante:
window.devicepixelratio: 1.5 (précis)
screen.devicexdpi / screen.logicalxdpi: 1.5
fenêtre.outerwidth / window.innerwidth: 1.0084033613445377
document.DocumentElement.offsetheight / window.innerheight: 0.02203856749311295 (avec corrélation)
window.top.outerwidth / window.top.innerwidth: 1.0084033613445377
IE10
La copie de code est la suivante:
window.devicepixelratio: non défini
screen.devicexdpi / screen.logicalxdpi: 1.5 (précis)
fenêtre.outerwidth / window.innerwidth: 1.0084033613445377
document.documentElement.offsetheight / window.innerheight: 1
window.top.outerwidth / window.top.innerwidth: 1.0084033613445377
IE9
La copie de code est la suivante:
window.devicepixelratio: non défini
screen.devicexdpi / screen.logicalxdpi: 1.5 (précis)
fenêtre.outerwidth / window.innerwidth: 1.0084033613445377
document.documentElement.offsetheight / window.innerheight: 1
window.top.outerwidth / window.top.innerwidth: 1.0084033613445377
360 6.3 (pas de réponse du tout)
La copie de code est la suivante:
window.devicepixelratio: non défini
screp.devicexdpi / screen.logicalxdpi: 1
window.outerwidth / window.innerwidth: nan
document.documentElement.offsetheight / window.innerheight: nan
window.top.outerwidth / window.top.innerwidth: nan
Navigateur à 360 vitesses
La copie de code est la suivante:
window.devicepixelratio: 1
screen.devicexdpi / screen.logicalxdpi: nan
window.outerwidth / window.innerwidth: 1.5
document.documentElement.offsetheight / window.innerheight: 0.015267175572519083
window.top.outerwidth / window.top.innerwidth: 1.5 (précis)
Sogou High Speed Browser (pas de réponse du tout)
La copie de code est la suivante:
window.devicepixelratio: non défini
screp.devicexdpi / screen.logicalxdpi: 1
window.outerwidth / window.innerwidth: nan
document.documentElement.offsetheight / window.innerheight: nan
window.top.outerwidth / window.top.innerwidth: nan
Navigateur de Taobao
La copie de code est la suivante:
window.devicepixelratio: 1
screen.devicexdpi / screen.logicalxdpi: nan
window.outerwidth / window.innerwidth: 2.0710059171597632 (à peu près précis)
document.DocumentElement.offsetheight / window.innerheight: 0.022988505747126436
window.top.outerwidth / window.top.innerwidth: 2.0710059171597632