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
= 'image-checks-for-width.php';
22 img
.onerror
= fail(3);
23 document
.body
.appendChild(img
);
25 var loadViewportImage
= function() {
26 var img
= new Image();
27 img
.src
= 'image-checks-for-viewport-width.php';
28 img
.onload
= loadRWImage
;
29 img
.onerror
= fail(2);
30 document
.body
.appendChild(img
);
32 var img
= new Image();
33 img
.src
= 'image-checks-for-dpr.php';
34 img
.onload
= loadViewportImage
;
35 img
.onerror
= fail(1);
36 document
.body
.appendChild(img
);