Please enable JavaScript.
Coggle requires JavaScript to display documents.
浏览器环境 (same origin policy (跨域问题 (postMessage, res header Access-Control…
浏览器环境
-
storage (same origin)
HTML4
cookie
特点:
浏览器:
cookie 4K limit 包括 key-value,下次请求会自动代码这个 cookie
每个域下一般只能有几十 个 cookie,
超过这个数量的会清理旧的 cookie,
只能访问本域下的 cookie
服务端:
返回头加 Set-Cookie 来设置 cookie,
httponly : 前端无法操纵 cookie
-
-
-
Web Worke
-
特点
-
-
-
通过通信和主线程传输数据
var worker = new Worker('work.js');
worker.postMessage('Hello World');
worker.postMessage({method: 'echo', args: ['Work']});
worker.onmessage = function (event) {
console.log('Received message ' + event.data);
doSomething();
}
-
-