Device size in JavaScript and media breakpoint in CSS

Adding viewport tag  

No scale when rotate

Device Width
@media device-width breakpoint
Browser Width
@media width breakpoint

This width is the screen.width in JavaScript. It is equivalent to the @media device-width in CSS.

Note: There is something special for the iOS's Device Width. For details please check the last test item at the bottom of this page.

The width is tested by the window.matchMedia("(max-device-width: ??px)") function in JavaScript. It is equivalent to the @media max-device-width in CSS.
The width is gotten by Math.max(document.documentElement.clientWidth, window.innerWidth) in JavaScript. In most cases it is the same value of the @media max-width in CSS. But sometimes it is not the save value. For details please refer to the second last test item at the bottom of this page.
The width is tested by the window.matchMedia("(max-width: ??px)") function in JavaScript. It is equivalent to the @media max-width in CSS.

This lab is designed to test: