[viewport] maximum-scale=1.0, user-scalable=0


<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />

-> ユーザーがズームできるかどうかの設定。
-> 初期値はyes。yes=1,no=0。

maximum-scale 最大倍率
-> 最小拡大比率の設定。
-> デフォルトは1.6で指定可能範囲は0より大きく、10までの値。

つまり、「maximum-scale=1.0, user-scalable=0」だと、ユーザのズームを禁止しており、仕様にもよるが、多くの場合、ユーザエクスペリエンス上、望ましくないとのこと。


Camera and Audio Input

<input type="file" accept="image/*;capture=camera">
<input type="file" accept="image/*;capture=camcorder">
<input type="file" accept="image/*;capture=microphone">

problems with file input capture
-only works on mobile
-file open button is unstylable
-different app can break the flow

navigator.getUserMedia(constraints, successCallback, errorCallback);

function openCameraPane(callback, fullscreen) {
	if (fullscreen)
	_myVideoCallback = callback;
	var constraints = {video: true};
function successCallback(stream) {
	var video = createVideoUserInterface();
	video.src = window.URL.createObjectURL(stream);
function snapshot(ev) {
	var video = document.querySelector('.camera-video');
	var canvas = document.querySelector('.camera-picture');
	var ctx = canvas.getContext('2d');

  ctx.drawImage(video, 0, 0);

html5 geolocation API
maps, augmented reality, geocaching, nearby features

			position.coords.longitude )

Vibration API

viewport and media query

<meta name="viewport" content="width=device-width">

start this tag.

<meta name="viewport" content="width=device-width,initial-scale=1">

1vmin = 1vm or 1vh, whichever is smallest
1vmax = 1vm or 1vh, whichever is largest

available media query expressions
width, height, device-width, device-height, orientation, aspect-ratio,
device-aspect-ratio, grid, color, color-index, monochrome, resolution, scan

.menu-items-grid {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: space-around;
    padding: 0 1%

@media (orientation:portrait){
  .menu-items-grid {
    flex-direction: column;


@media (min-pixel-ratio:2){
  .pretteybackground {
    background: url('images/hires_bkg.png');

cellular radio lifecycle
Idle -> active -> short sleep -> long sleep

-lifecycle of an HTTP request
DNS lookup -> socket connect -> HTTP request -> Data download

avoid redirect
minimize or eliminate render-blocking resources (stylesheets, fonts, unknown-size, image)

animation framework
settimeout, setInterval -> requestAnimationFrame

touch UI
hover does not rely on
use large hit target
do not disable mouse support

touch events
->touchstart, touchmove, touchend, touch cancel

html5 has tel input type.

<input type="tel">
  <input type="checkbox">
  "Do you love lemurs?"

view port


<meta name="viewport" content="width=device-width, initial-scale=1">

initial-scale indicate relationship between device independent pixel and css pixel.

<meta name="viewport" content="width=360,initial-scale=1">

prevent image overflow content

img, embed, object, video {
  max-width: 100%


<img id="owl">
#owl {
 width: 640px;
 max-width: 100%;


nav a, button {
min-width: 48px;
max-height: 48px;

Device Pixel Ratio

device pixel ratio:デバイス・ピクセルとCSSピクセルの比率のこと
The device pixel ratio is the ratio between physical pixels and logical pixels. For instance, the iPhone 4 and iPhone 4S report a device pixel ratio of 2, because the physical linear resolution is double the logical linear resolution.

device pixel / hardware pixel: デバイス・端末がサポートする物理的な最小単位のピクセル。ハードウェア・ピクセルともいう。

CSS pixel:CSSで使う論理上のピクセル。デバイス・ピクセルが物理的なピクセルの数であるのに対し、CSSピクセルは論理上のピクセルの数です。
CSS properties take “length” values, such as width, margin, padding, font-size, border-width, etc.Length is a number followed by a length unit, such as 10px, 2em, etc.
A whitespace cannot appear between the number and the unit. However, if the value is 0, the unit can be omitted.For some CSS properties, negative lengths are allowed.
There are two types of length units: relative and absolute.

User agent:利用者があるプロトコルに基づいてデータを利用する際に用いるソフトウェアまたはハードウェアのこと。 特にHTTPを用いてWorld Wide Webにアクセスする、ウェブブラウザなどのソフトウェアのこと。
In computing, a user agent is software (a software agent) that is acting on behalf of a user. One common use of the term refers to a web browser telling a web site information about the browser and operating system.

Example:Mozilla/5.0 (Linux; Android 5.0; Nexus 6 Build/XXX00x) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.59 Mobile Safari/537.36

Google dev tool remote debugging

Hardware Pixel and Device Independent Pixel

With font boosting and without font boosting


<!DOCTYPE html>
<meta charset="utf-8"> 
<meta name="viewport" content="...">
<title>title here</title>

1920 x 1980 px
DPR = 2
maximum width of a viewport is 960px