2 header("ACCEPT-CH: DPR, Width, Viewport-Width");
7 var fail
= function(num
) {
9 parent
.postMessage("fail "+ num
, "*");
13 var success
= function() {
14 parent
.postMessage("success", "*");
17 var loadRWImage
= function() {
18 var img
= new Image();
19 img
.src
= 'resources/image-checks-for-width.php';
22 img
.onerror
= success
;
23 document
.body
.appendChild(img
);
25 var loadViewportImage
= function() {
26 var img
= new Image();
27 img
.src
= 'resources/image-checks-for-viewport-width.php';
29 img
.onerror
= loadRWImage
;
30 document
.body
.appendChild(img
);
32 var img
= new Image();
33 img
.src
= 'resources/image-checks-for-dpr.php';
35 img
.onerror
= loadViewportImage
;
36 document
.body
.appendChild(img
);