Determining Devices, Checking Mobile Systems with JavaScript
JavaScript Device Detection, Mobile System Check
if ( /AppleWebKit.*Mobile/i.test(navigator.userAgent) || /MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test( navigator.userAgent )) { if (window.location.href.indexOf("?mobile") < 0) { try { if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { window.location.href = "../m/index.html"; ...
responsive viewport meta Label configuration
<meta name="viewport" content="width=device-width, initial-scale=1.0">
width: Controls the size of the viewport, can be specified with a value, like 600, or special values like –
device-width: Width of the device (in CSS pixels at a scale of 100%).
height: Corresponds to width, specifies height.
initial-scale: Initial scale ratio, i.e., the scale ratio when the page is first loaded.
maximum-scale: Maximum scale ratio allowed for users.
minimum-scale: Minimum scale rat ...
Difference Between pageX, clientX, and screenX
Difference Between pageX, clientX, and screenX
screenX and screenY are measured with our computer screen as the reference point.
pageX and pageY align with the document (absolute positioning) as the reference point, not recognized by IE678.
clientX and clientY are relative to the viewport, similar to fixed positioning.
copyright
Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)