{"id":191407,"date":"2020-05-29T10:00:30","date_gmt":"2020-05-29T02:00:30","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=191407"},"modified":"2020-05-18T09:00:40","modified_gmt":"2020-05-18T01:00:40","slug":"front-end-browser-works","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/front-end-browser-works.html","title":{"rendered":"\u524d\u7aef\u6d4f\u89c8\u5668\u5de5\u4f5c\u539f\u7406"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5728\u6211\u4eec\u9762\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u9762\u8bd5\u5b98\u7ecf\u5e38\u4f1a\u95ee\u5230\u8fd9\u4e48\u4e00\u4e2a\u95ee\u9898\uff0c\u90a3\u5c31\u662f\u4ece\u5728\u6d4f\u89c8\u5668\u5730\u5740\u680f\u4e2d\u8f93\u5165URL\u5230\u9875\u9762\u663e\u793a\uff0c\u6d4f\u89c8\u5668\u5230\u5e95\u53d1\u751f\u4e86\u4ec0\u4e48\uff1f\u8fd9\u4e2a\u95ee\u9898\u770b\u8d77\u6765\u662f\u8001\u751f\u5e38\u8c08\uff0c\u4f46\u662f\u8fd9\u4e2a\u95ee\u9898\u56de\u7b54\u7684\u597d\u574f\uff0c\u786e\u5b9e\u53ef\u4ee5\u5f88\u597d\u7684\u53cd\u6620\u51fa\u9762\u8bd5\u8005\u77e5\u8bc6\u7684\u5e7f\u5ea6\u548c\u6df1\u5ea6\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u672c\u6587\u4ece\u6d4f\u89c8\u5668\u89d2\u5ea6\u6765\u544a\u8bc9\u4f60\uff0cURL\u540e\u8f93\u5165\u540e\u6309\u56de\u8f66\uff0c\u6d4f\u89c8\u5668\u5185\u90e8\u7a76\u7adf\u53d1\u751f\u4e86\u4ec0\u4e48\uff0c\u8bfb\u5b8c\u672c\u6587\u540e\uff0c\u4f60\u5c06\u4e86\u89e3\u5230\uff1a<\/p>\n

  • \u6d4f\u89c8\u5668\u5185\u6709\u54ea\u4e9b\u8fdb\u7a0b\uff0c\u8fd9\u4e9b\u8fdb\u7a0b\u90fd\u6709\u4e9b\u4ec0\u4e48\u4f5c\u7528<\/li>\n
  • \u6d4f\u89c8\u5668\u5730\u5740\u8f93\u5165URL\u540e\uff0c\u5185\u90e8\u7684\u8fdb\u7a0b\u3001\u7ebf\u7a0b\u90fd\u505a\u4e86\u54ea\u4e9b\u4e8b<\/li>\n
  • \u6211\u4eec\u4e0e\u6d4f\u89c8\u5668\u4ea4\u4e92\u65f6\uff0c\u5185\u90e8\u8fdb\u7a0b\u662f\u600e\u4e48\u5904\u7406\u8fd9\u4e9b\u4ea4\u4e92\u4e8b\u4ef6\u7684<\/li>\n
    \u6d4f\u89c8\u5668\u67b6\u6784<\/strong><\/div>\n

    \u5728\u8bb2\u6d4f\u89c8\u5668\u67b6\u6784\u4e4b\u524d\uff0c\u5148\u7406\u89e3\u4e24\u4e2a\u6982\u5ff5\uff0c\u8fdb\u7a0b\u548c\u7ebf\u7a0b\u3002<\/p>\n

    \u8fdb\u7a0b\uff08process\uff09\u662f\u7a0b\u5e8f\u7684\u4e00\u6b21\u6267\u884c\u8fc7\u7a0b\uff0c\u662f\u4e00\u4e2a\u52a8\u6001\u6982\u5ff5\uff0c\u662f\u7a0b\u5e8f\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\u5206\u914d\u548c\u7ba1\u7406\u8d44\u6e90\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u7ebf\u7a0b\uff08thread\uff09\u662fCPU\u8c03\u5ea6\u548c\u5206\u6d3e\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u5b83\u53ef\u4e0e\u540c\u5c5e\u4e00\u4e2a\u8fdb\u7a0b\u7684\u5176\u4ed6\u7684\u7ebf\u7a0b\u5171\u4eab\u8fdb\u7a0b\u6240\u62e5\u6709\u7684\u5168\u90e8\u8d44\u6e90\u3002<\/p>\n

    \u7b80\u5355\u7684\u8bf4\u5462\uff0c\u8fdb\u7a0b\u53ef\u4ee5\u7406\u89e3\u6210\u6b63\u5728\u6267\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u800c\u7ebf\u7a0b\u5462\uff0c\u53ef\u4ee5\u7406\u89e3\u6210\u6211\u4eec\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u4ee3\u7801\u7684\u6267\u884c\u5668\u3002\u800c\u4ed6\u4eec\u7684\u5173\u7cfb\u53ef\u60f3\u800c\u77e5\uff0c\u7ebf\u7a0b\u662f\u8dd1\u5728\u8fdb\u7a0b\u91cc\u9762\u7684\uff0c\u4e00\u4e2a\u8fdb\u7a0b\u91cc\u9762\u53ef\u80fd\u6709\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u7ebf\u7a0b\uff0c\u800c\u4e00\u4e2a\u7ebf\u7a0b\uff0c\u53ea\u80fd\u96b6\u5c5e\u4e8e\u4e00\u4e2a\u8fdb\u7a0b\u3002<\/p>\n

    \u5927\u5bb6\u90fd\u77e5\u9053\uff0c\u6d4f\u89c8\u5668\u5c5e\u4e8e\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\uff0c\u800c\u5e94\u7528\u7a0b\u5e8f\u7684\u4e00\u6b21\u6267\u884c\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u8ba1\u7b97\u673a\u542f\u52a8\u4e86\u4e00\u4e2a\u8fdb\u7a0b\uff0c\u8fdb\u7a0b\u542f\u52a8\u540e\uff0cCPU\u4f1a\u7ed9\u8be5\u8fdb\u7a0b\u5206\u914d\u76f8\u5e94\u7684\u5185\u5b58\u7a7a\u95f4\uff0c\u5f53\u6211\u4eec\u7684\u8fdb\u7a0b\u5f97\u5230\u4e86\u5185\u5b58\u4e4b\u540e\uff0c\u5c31\u53ef\u4ee5\u4f7f\u7528\u7ebf\u7a0b\u8fdb\u884c\u8d44\u6e90\u8c03\u5ea6\uff0c\u8fdb\u800c\u5b8c\u6210\u6211\u4eec\u5e94\u7528\u7a0b\u5e8f\u7684\u529f\u80fd\u3002<\/p>\n

    \u800c\u5728\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u4e3a\u4e86\u6ee1\u8db3\u529f\u80fd\u7684\u9700\u8981\uff0c\u542f\u52a8\u7684\u8fdb\u7a0b\u4f1a\u521b\u5efa\u53e6\u5916\u7684\u65b0\u7684\u8fdb\u7a0b\u6765\u5904\u7406\u5176\u4ed6\u4efb\u52a1\uff0c\u8fd9\u4e9b\u521b\u5efa\u51fa\u6765\u7684\u65b0\u7684\u8fdb\u7a0b\u62e5\u6709\u5168\u65b0\u7684\u72ec\u7acb\u7684\u5185\u5b58\u7a7a\u95f4\uff0c\u4e0d\u80fd\u4e0e\u539f\u6765\u7684\u8fdb\u7a0b\u5185\u5411\u5185\u5b58\uff0c\u5982\u679c\u8fd9\u4e9b\u8fdb\u7a0b\u4e4b\u95f4\u9700\u8981\u901a\u4fe1\uff0c\u53ef\u4ee5\u901a\u8fc7IPC\u673a\u5236\uff08Inter Process Communication\uff09\u6765\u8fdb\u884c\u3002<\/p>\n

    \u5f88\u591a\u5e94\u7528\u7a0b\u5e8f\u90fd\u4f1a\u91c7\u53d6\u8fd9\u79cd\u591a\u8fdb\u7a0b\u7684\u65b9\u5f0f\u6765\u5de5\u4f5c\uff0c\u56e0\u4e3a\u8fdb\u7a0b\u548c\u8fdb\u7a0b\u4e4b\u95f4\u662f\u4e92\u76f8\u72ec\u7acb\u7684\u5b83\u4eec\u4e92\u4e0d\u5f71\u54cd\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5f53\u5176\u4e2d\u4e00\u4e2a\u8fdb\u7a0b\u6302\u6389\u4e86\u4e4b\u540e\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5230\u5176\u4ed6\u8fdb\u7a0b\u7684\u6267\u884c\uff0c\u53ea\u9700\u8981\u91cd\u542f\u6302\u6389\u7684\u8fdb\u7a0b\u5c31\u53ef\u4ee5\u6062\u590d\u8fd0\u884c\u3002<\/p>\n

    \u6d4f\u89c8\u5668\u7684\u591a\u8fdb\u7a0b\u67b6\u6784<\/strong><\/div>\n

    \u5047\u5982\u6211\u4eec\u53bb\u5f00\u53d1\u4e00\u4e2a\u6d4f\u89c8\u5668\uff0c\u5b83\u7684\u67b6\u6784\u53ef\u4ee5\u662f\u4e00\u4e2a\u5355\u8fdb\u7a0b\u591a\u7ebf\u7a0b\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u4e5f\u53ef\u4ee5\u662f\u4e00\u4e2a\u4f7f\u7528IPC\u901a\u4fe1\u7684\u591a\u8fdb\u7a0b\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n

    \u4e0d\u540c\u7684\u6d4f\u89c8\u5668\u4f7f\u7528\u4e0d\u540c\u7684\u67b6\u6784\uff0c\u4e0b\u9762\u4e3b\u8981\u4ee5Chrome\u4e3a\u4f8b\uff0c\u4ecb\u7ecd\u6d4f\u89c8\u5668\u7684\u591a\u8fdb\u7a0b\u67b6\u6784\u3002<\/p>\n

    \u5728Chrome\u4e2d\uff0c\u4e3b\u8981\u7684\u8fdb\u7a0b\u67094\u4e2a\uff1a<\/p>\n

  • \u6d4f\u89c8\u5668\u8fdb\u7a0b (Browser Process)\uff1a\u8d1f\u8d23\u6d4f\u89c8\u5668\u7684TAB\u7684\u524d\u8fdb\u3001\u540e\u9000\u3001\u5730\u5740\u680f\u3001\u4e66\u7b7e\u680f\u7684\u5de5\u4f5c\u548c\u5904\u7406\u6d4f\u89c8\u5668\u7684\u4e00\u4e9b\u4e0d\u53ef\u89c1\u7684\u5e95\u5c42\u64cd\u4f5c\uff0c\u6bd4\u5982\u7f51\u7edc\u8bf7\u6c42\u548c\u6587\u4ef6\u8bbf\u95ee\u3002<\/li>\n
  • \u6e32\u67d3\u8fdb\u7a0b (Renderer Process)\uff1a\u8d1f\u8d23\u4e00\u4e2aTab\u5185\u7684\u663e\u793a\u76f8\u5173\u7684\u5de5\u4f5c\uff0c\u4e5f\u79f0\u6e32\u67d3\u5f15\u64ce\u3002<\/li>\n
  • \u63d2\u4ef6\u8fdb\u7a0b (Plugin Process)\uff1a\u8d1f\u8d23\u63a7\u5236\u7f51\u9875\u4f7f\u7528\u5230\u7684\u63d2\u4ef6<\/li>\n
  • GPU\u8fdb\u7a0b (GPU Process)\uff1a\u8d1f\u8d23\u5904\u7406\u6574\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684GPU\u4efb\u52a1<\/li>\n

    \u8fd94\u4e2a\u8fdb\u7a0b\u4e4b\u95f4\u7684\u5173\u7cfb\u662f\u4ec0\u4e48\u5462\uff1f<\/p>\n

    \u9996\u5148\uff0c\u5f53\u6211\u4eec\u662f\u8981\u6d4f\u89c8\u4e00\u4e2a\u7f51\u9875\uff0c\u6211\u4eec\u4f1a\u5728\u6d4f\u89c8\u5668\u7684\u5730\u5740\u680f\u91cc\u8f93\u5165URL\uff0c\u8fd9\u4e2a\u65f6\u5019Browser Process\u4f1a\u5411\u8fd9\u4e2aURL\u53d1\u9001\u8bf7\u6c42\uff0c\u83b7\u53d6\u8fd9\u4e2aURL\u7684HTML\u5185\u5bb9\uff0c\u7136\u540e\u5c06HTML\u4ea4\u7ed9Renderer Process\uff0cRenderer Process\u89e3\u6790HTML\u5185\u5bb9\uff0c\u89e3\u6790\u9047\u5230\u9700\u8981\u8bf7\u6c42\u7f51\u7edc\u7684\u8d44\u6e90\u53c8\u8fd4\u56de\u6765\u4ea4\u7ed9Browser Process\u8fdb\u884c\u52a0\u8f7d\uff0c\u540c\u65f6\u901a\u77e5Browser Process\uff0c\u9700\u8981Plugin Process\u52a0\u8f7d\u63d2\u4ef6\u8d44\u6e90\uff0c\u6267\u884c\u63d2\u4ef6\u4ee3\u7801\u3002\u89e3\u6790\u5b8c\u6210\u540e\uff0cRenderer Process\u8ba1\u7b97\u5f97\u5230\u56fe\u50cf\u5e27\uff0c\u5e76\u5c06\u8fd9\u4e9b\u56fe\u50cf\u5e27\u4ea4\u7ed9GPU Process\uff0cGPU Process\u5c06\u5176\u8f6c\u5316\u4e3a\u56fe\u50cf\u663e\u793a\u5c4f\u5e55\u3002<\/p>\n

    \u591a\u8fdb\u7a0b\u67b6\u6784\u7684\u597d\u5904<\/strong><\/div>\n

    Chrome\u4e3a\u4ec0\u4e48\u8981\u4f7f\u7528\u591a\u8fdb\u7a0b\u67b6\u6784\u5462\uff1f<\/p>\n

    \u7b2c\u4e00\uff0c\u66f4\u9ad8\u7684\u5bb9\u9519\u6027\u3002\u5f53\u4ecaWEB\u5e94\u7528\u4e2d\uff0cHTML\uff0cJavaScript\u548cCSS\u65e5\u76ca\u590d\u6742\uff0c\u8fd9\u4e9b\u8dd1\u5728\u6e32\u67d3\u5f15\u64ce\u7684\u4ee3\u7801\uff0c\u9891\u7e41\u7684\u51fa\u73b0BUG\uff0c\u800c\u6709\u4e9bBUG\u4f1a\u76f4\u63a5\u5bfc\u81f4\u6e32\u67d3\u5f15\u64ce\u5d29\u6e83\uff0c\u591a\u8fdb\u7a0b\u67b6\u6784\u4f7f\u5f97\u6bcf\u4e00\u4e2a\u6e32\u67d3\u5f15\u64ce\u8fd0\u884c\u5728\u5404\u81ea\u7684\u8fdb\u7a0b\u4e2d\uff0c\u76f8\u4e92\u4e4b\u95f4\u4e0d\u53d7\u5f71\u54cd\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u5f53\u5176\u4e2d\u4e00\u4e2a\u9875\u9762\u5d29\u6e83\u6302\u6389\u4e4b\u540e\uff0c\u5176\u4ed6\u9875\u9762\u8fd8\u53ef\u4ee5\u6b63\u5e38\u7684\u8fd0\u884c\u4e0d\u6536\u5f71\u54cd\u3002<\/p>\n

    \u7b2c\u4e8c\uff0c\u66f4\u9ad8\u7684\u5b89\u5168\u6027\u548c\u6c99\u76d2\u6027\uff08sanboxing\uff09\u3002\u6e32\u67d3\u5f15\u64ce\u4f1a\u7ecf\u5e38\u6027\u7684\u5728\u7f51\u7edc\u4e0a\u9047\u5230\u4e0d\u53ef\u4fe1\u3001\u751a\u81f3\u662f\u6076\u610f\u7684\u4ee3\u7801\uff0c\u5b83\u4eec\u4f1a\u5229\u7528\u8fd9\u4e9b\u6f0f\u6d1e\u5728\u4f60\u7684\u7535\u8111\u4e0a\u5b89\u88c5\u6076\u610f\u7684\u8f6f\u4ef6\uff0c\u9488\u5bf9\u8fd9\u4e00\u95ee\u9898\uff0c\u6d4f\u89c8\u5668\u5bf9\u4e0d\u540c\u8fdb\u7a0b\u9650\u5236\u4e86\u4e0d\u540c\u7684\u6743\u9650\uff0c\u5e76\u4e3a\u5176\u63d0\u4f9b\u6c99\u76d2\u8fd0\u884c\u73af\u5883\uff0c\u4f7f\u5176\u66f4\u5b89\u5168\u66f4\u53ef\u9760<\/p>\n

    \u7b2c\u4e09\uff0c\u66f4\u9ad8\u7684\u54cd\u5e94\u901f\u5ea6\u3002\u5728\u5355\u8fdb\u7a0b\u7684\u67b6\u6784\u4e2d\uff0c\u5404\u4e2a\u4efb\u52a1\u76f8\u4e92\u7ade\u4e89\u62a2\u593aCPU\u8d44\u6e90\uff0c\u4f7f\u5f97\u6d4f\u89c8\u5668\u54cd\u5e94\u901f\u5ea6\u53d8\u6162\uff0c\u800c\u591a\u8fdb\u7a0b\u67b6\u6784\u6b63\u597d\u89c4\u907f\u4e86\u8fd9\u4e00\u7f3a\u70b9\u3002<\/p>\n

    \u591a\u8fdb\u7a0b\u67b6\u6784\u4f18\u5316<\/strong><\/div>\n

    \u4e4b\u524d\u7684\u6211\u4eec\u8bf4\u5230\uff0cRenderer Process\u7684\u4f5c\u7528\u662f\u8d1f\u8d23\u4e00\u4e2aTab\u5185\u7684\u663e\u793a\u76f8\u5173\u7684\u5de5\u4f5c\uff0c\u8fd9\u5c31\u610f\u5473\u7740\uff0c\u4e00\u4e2aTab\uff0c\u5c31\u4f1a\u6709\u4e00\u4e2aRenderer Process\uff0c\u8fd9\u4e9b\u8fdb\u7a0b\u4e4b\u95f4\u7684\u5185\u5b58\u65e0\u6cd5\u8fdb\u884c\u5171\u4eab\uff0c\u800c\u4e0d\u540c\u8fdb\u7a0b\u7684\u5185\u5b58\u5e38\u5e38\u9700\u8981\u5305\u542b\u76f8\u540c\u7684\u5185\u5bb9\u3002<\/p>\n

    \u6d4f\u89c8\u5668\u7684\u8fdb\u7a0b\u6a21\u5f0f<\/strong><\/div>\n

    \u4e3a\u4e86\u8282\u7701\u5185\u5b58\uff0cChrome\u63d0\u4f9b\u4e86\u56db\u79cd\u8fdb\u7a0b\u6a21\u5f0f\uff08Process Models\uff09\uff0c\u4e0d\u540c\u7684\u8fdb\u7a0b\u6a21\u5f0f\u4f1a\u5bf9 tab \u8fdb\u7a0b\u505a\u4e0d\u540c\u7684\u5904\u7406\u3002<\/p>\n

  • Process-per-site-instance (default) - \u540c\u4e00\u4e2a site-instance \u4f7f\u7528\u4e00\u4e2a\u8fdb\u7a0b<\/li>\n
  • Process-per-site - \u540c\u4e00\u4e2a site \u4f7f\u7528\u4e00\u4e2a\u8fdb\u7a0b<\/li>\n
  • Process-per-tab - \u6bcf\u4e2a tab \u4f7f\u7528\u4e00\u4e2a\u8fdb\u7a0b<\/li>\n
  • Single process - \u6240\u6709 tab \u5171\u7528\u4e00\u4e2a\u8fdb\u7a0b<\/li>\n

    \u8fd9\u91cc\u9700\u8981\u7ed9\u51fa site \u548c site-instance \u7684\u5b9a\u4e49<\/p>\n

  • site \u6307\u7684\u662f\u76f8\u540c\u7684 registered domain name(\u5982\uff1a google.com \uff0cbbc.co.uk)\u548cscheme (\u5982\uff1ahttps:\/\/)\u3002\u6bd4\u5982a.baidu.com\u548cb.baidu.com\u5c31\u53ef\u4ee5\u7406\u89e3\u4e3a\u540c\u4e00\u4e2a site\uff08\u6ce8\u610f\u8fd9\u91cc\u8981\u548c Same-origin policy \u533a\u5206\u5f00\u6765\uff0c\u540c\u6e90\u7b56\u7565\u8fd8\u6d89\u53ca\u5230\u5b50\u57df\u540d\u548c\u7aef\u53e3\uff09\u3002<\/li>\n
  • site-instance \u6307\u7684\u662f\u4e00\u7ec4 connected pages from the same site\uff0c\u8fd9\u91cc connected \u7684\u5b9a\u4e49\u662f can obtain references to each other in script code \u600e\u4e48\u7406\u89e3\u8fd9\u6bb5\u8bdd\u5462\u3002\u6ee1\u8db3\u4e0b\u9762\u4e24\u4e2d\u60c5\u51b5\u5e76\u4e14\u6253\u5f00\u7684\u65b0\u9875\u9762\u548c\u65e7\u9875\u9762\u5c5e\u4e8e\u4e0a\u9762\u5b9a\u4e49\u7684\u540c\u4e00\u4e2a site\uff0c\u5c31\u5c5e\u4e8e\u540c\u4e00\u4e2a site-instance<\/li>\n
  • \u7528\u6237\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\u70b9\u51fb\u6253\u5f00\u7684\u65b0\u9875\u9762<\/a><\/li>\n
  • JS\u4ee3\u7801\u6253\u5f00\u7684\u65b0\u9875\u9762\uff08\u6bd4\u5982 window.open)<\/li>\n

    \u7406\u89e3\u4e86\u6982\u5ff5\u4e4b\u540e\uff0c\u4e0b\u9762\u89e3\u91ca\u56db\u4e2a\u8fdb\u7a0b\u6a21\u5f0f<\/p>\n

    \u9996\u5148\u662fSingle process\uff0c\u987e\u540d\u601d\u4e49\uff0c\u5355\u8fdb\u7a0b\u6a21\u5f0f\uff0c\u6240\u6709tab\u90fd\u4f1a\u4f7f\u7528\u540c\u4e00\u4e2a\u8fdb\u7a0b\u3002\u63a5\u4e0b\u6765\u662fProcess-per-tab \uff0c\u4e5f\u662f\u987e\u540d\u601d\u4e49\uff0c\u6bcf\u6253\u5f00\u4e00\u4e2atab\uff0c\u4f1a\u65b0\u5efa\u4e00\u4e2a\u8fdb\u7a0b\u3002\u800c\u5bf9\u4e8eProcess-per-site\uff0c\u5f53\u4f60\u6253\u5f00 a.baidu.com \u9875\u9762\uff0c\u5728\u6253\u5f00 b.baidu.com \u7684\u9875\u9762\uff0c\u8fd9\u4e24\u4e2a\u9875\u9762\u7684tab\u4f7f\u7528\u7684\u662f\u5171\u4e00\u4e2a\u8fdb\u7a0b\uff0c\u56e0\u4e3a\u8fd9\u4e24\u4e2a\u9875\u9762\u7684site\u76f8\u540c\uff0c\u800c\u5982\u6b64\u4e00\u6765\uff0c\u5982\u679c\u5176\u4e2d\u4e00\u4e2atab\u5d29\u6e83\u4e86\uff0c\u800c\u53e6\u4e00\u4e2atab\u4e5f\u4f1a\u5d29\u6e83\u3002<\/p>\n

    Process-per-site-instance \u662f\u6700\u91cd\u8981\u7684\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u662f Chrome \u9ed8\u8ba4\u4f7f\u7528\u7684\u6a21\u5f0f\uff0c\u4e5f\u5c31\u662f\u51e0\u4e4e\u6240\u6709\u7684\u7528\u6237\u90fd\u5728\u7528\u7684\u6a21\u5f0f\u3002\u5f53\u4f60\u6253\u5f00\u4e00\u4e2a tab \u8bbf\u95ee a.baidu.com \uff0c\u7136\u540e\u518d\u6253\u5f00\u4e00\u4e2a tab \u8bbf\u95ee b.baidu.com\uff0c\u8fd9\u4e24\u4e2a tab \u4f1a\u4f7f\u7528\u4e24\u4e2a\u8fdb\u7a0b\u3002\u800c\u5982\u679c\u4f60\u5728 a.baidu.com \u4e2d\uff0c\u901a\u8fc7JS\u4ee3\u7801\u6253\u5f00\u4e86 b.baidu.com \u9875\u9762\uff0c\u8fd9\u4e24\u4e2a tab \u4f1a\u4f7f\u7528\u540c\u4e00\u4e2a\u8fdb\u7a0b\u3002<\/p>\n

    \u9ed8\u8ba4\u6a21\u5f0f\u9009\u62e9<\/strong><\/div>\n

    \u90a3\u4e48\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f7f\u7528Process-per-site-instance\u4f5c\u4e3a\u9ed8\u8ba4\u7684\u8fdb\u7a0b\u6a21\u5f0f\u5462\uff1f<\/p>\n

    Process-per-site-instance\u517c\u5bb9\u4e86\u6027\u80fd\u4e0e\u6613\u7528\u6027\uff0c\u662f\u4e00\u4e2a\u6bd4\u8f83\u4e2d\u5eb8\u901a\u7528\u7684\u6a21\u5f0f\u3002<\/p>\n

  • \u76f8\u8f83\u4e8e Process-per-tab\uff0c\u80fd\u591f\u5c11\u5f00\u5f88\u591a\u8fdb\u7a0b\uff0c\u5c31\u610f\u5473\u7740\u66f4\u5c11\u7684\u5185\u5b58\u5360\u7528<\/li>\n
  • \u76f8\u8f83\u4e8e Process-per-site\uff0c\u80fd\u591f\u66f4\u597d\u7684\u9694\u79bb\u76f8\u540c\u57df\u540d\u4e0b\u6beb\u65e0\u5173\u8054\u7684 tab\uff0c\u66f4\u52a0\u5b89\u5168<\/li>\n
    \u5bfc\u822a\u8fc7\u7a0b\u90fd\u53d1\u751f\u4e86\u4ec0\u4e48<\/strong><\/div>\n

    \u524d\u9762\u6211\u4eec\u8bb2\u4e86\u6d4f\u89c8\u5668\u7684\u591a\u8fdb\u7a0b\u67b6\u6784\uff0c\u8bb2\u4e86\u591a\u8fdb\u7a0b\u67b6\u6784\u7684\u5404\u79cd\u597d\u5904\uff0c\u548cChrome\u662f\u600e\u4e48\u4f18\u5316\u591a\u8fdb\u7a0b\u67b6\u6784\u7684\uff0c\u4e0b\u9762\u4ece\u7528\u6237\u6d4f\u89c8\u7f51\u9875\u8fd9\u4e00\u7b80\u5355\u7684\u573a\u666f\uff0c\u6765\u6df1\u5165\u4e86\u89e3\u8fdb\u7a0b\u548c\u7ebf\u7a0b\u662f\u5982\u4f55\u5448\u73b0\u6211\u4eec\u7684\u7f51\u7ad9\u9875\u9762\u7684\u3002<\/p>\n

    \u7f51\u9875\u52a0\u8f7d\u8fc7\u7a0b<\/strong><\/div>\n

    \u4e4b\u524d\u6211\u4eec\u6211\u4eec\u63d0\u5230\uff0ctab\u4ee5\u5916\u7684\u5927\u90e8\u5206\u5de5\u4f5c\u7531\u6d4f\u89c8\u5668\u8fdb\u7a0bBrowser Process\u8d1f\u8d23\uff0c\u9488\u5bf9\u5de5\u4f5c\u7684\u4e0d\u540c\uff0cBrowser Process \u5212\u5206\u51fa\u4e0d\u540c\u7684\u5de5\u4f5c\u7ebf\u7a0b\uff1a<\/p>\n

  • UI thread\uff1a\u63a7\u5236\u6d4f\u89c8\u5668\u4e0a\u7684\u6309\u94ae\u53ca\u8f93\u5165\u6846\uff1b<\/li>\n
  • network thread\uff1a\u5904\u7406\u7f51\u7edc\u8bf7\u6c42\uff0c\u4ece\u7f51\u4e0a\u83b7\u53d6\u6570\u636e\uff1b<\/li>\n
  • storage thread\uff1a \u63a7\u5236\u6587\u4ef6\u7b49\u7684\u8bbf\u95ee\uff1b<\/li>\n

    \"\"<\/p>\n

    \u7b2c\u4e00\u6b65\uff1a\u5904\u7406\u8f93\u5165<\/strong><\/span><\/div>\n

    \u5f53\u6211\u4eec\u5728\u6d4f\u89c8\u5668\u7684\u5730\u5740\u680f\u8f93\u5165\u5185\u5bb9\u6309\u4e0b\u56de\u8f66\u65f6\uff0cUI thread\u4f1a\u5224\u65ad\u8f93\u5165\u7684\u5185\u5bb9\u662f\u641c\u7d22\u5173\u952e\u8bcd\uff08search query\uff09\u8fd8\u662fURL\uff0c\u5982\u679c\u662f\u641c\u7d22\u5173\u952e\u8bcd\uff0c\u8df3\u8f6c\u81f3\u9ed8\u8ba4\u641c\u7d22\u5f15\u64ce\u5bf9\u5e94\u90fd\u641c\u7d22URL\uff0c\u5982\u679c\u8f93\u5165\u7684\u5185\u5bb9\u662fURL\uff0c\u5219\u5f00\u59cb\u8bf7\u6c42URL\u3002<\/p>\n

    \"\"<\/p>\n

    \u7b2c\u4e8c\u6b65\uff1a\u5f00\u59cb\u5bfc\u822a<\/strong><\/span><\/div>\n

    \u56de\u8f66\u6309\u4e0b\u540e\uff0cUI thread\u5c06\u5173\u952e\u8bcd\u641c\u7d22\u5bf9\u5e94\u7684URL\u6216\u8f93\u5165\u7684URL\u4ea4\u7ed9\u7f51\u7edc\u7ebf\u7a0bNetwork thread\uff0c\u6b64\u65f6UI\u7ebf\u7a0b\u4f7fTab\u524d\u7684\u56fe\u6807\u5c55\u793a\u4e3a\u52a0\u8f7d\u4e2d\u72b6\u6001\uff0c\u7136\u540e\u7f51\u7edc\u8fdb\u7a0b\u8fdb\u884c\u4e00\u7cfb\u5217\u8bf8\u5982DNS\u5bfb\u5740\uff0c\u5efa\u7acbTLS\u8fde\u63a5\u7b49\u64cd\u4f5c\u8fdb\u884c\u8d44\u6e90\u8bf7\u6c42\uff0c\u5982\u679c\u6536\u5230\u670d\u52a1\u5668\u7684301\u91cd\u5b9a\u5411\u54cd\u5e94\uff0c\u5b83\u5c31\u4f1a\u544a\u77e5UI\u7ebf\u7a0b\u8fdb\u884c\u91cd\u5b9a\u5411\u7136\u540e\u5b83\u4f1a\u518d\u6b21\u53d1\u8d77\u4e00\u4e2a\u65b0\u7684\u7f51\u7edc\u8bf7\u6c42\u3002<\/p>\n

    \u7b2c\u4e09\u6b65\uff1a\u8bfb\u53d6\u54cd\u5e94<\/strong><\/span><\/div>\n

    network thread\u63a5\u6536\u5230\u670d\u52a1\u5668\u7684\u54cd\u5e94\u540e\uff0c\u5f00\u59cb\u89e3\u6790HTTP\u54cd\u5e94\u62a5\u6587\uff0c\u7136\u540e\u6839\u636e\u54cd\u5e94\u5934\u4e2d\u7684Content-Type\u5b57\u6bb5\u6765\u786e\u5b9a\u54cd\u5e94\u4e3b\u4f53\u7684\u5a92\u4f53\u7c7b\u578b\uff08MIME Type\uff09\uff0c\u5982\u679c\u5a92\u4f53\u7c7b\u578b\u662f\u4e00\u4e2aHTML\u6587\u4ef6\uff0c\u5219\u5c06\u54cd\u5e94\u6570\u636e\u4ea4\u7ed9\u6e32\u67d3\u8fdb\u7a0b\uff08renderer process\uff09\u6765\u8fdb\u884c\u4e0b\u4e00\u6b65\u7684\u5de5\u4f5c\uff0c\u5982\u679c\u662f zip \u6587\u4ef6\u6216\u8005\u5176\u5b83\u6587\u4ef6\uff0c\u4f1a\u628a\u76f8\u5173\u6570\u636e\u4f20\u8f93\u7ed9\u4e0b\u8f7d\u7ba1\u7406\u5668\u3002<\/p>\n

    \u4e0e\u6b64\u540c\u65f6\uff0c\u6d4f\u89c8\u5668\u4f1a\u8fdb\u884c Safe Browsing \u5b89\u5168\u68c0\u67e5\uff0c\u5982\u679c\u57df\u540d\u6216\u8005\u8bf7\u6c42\u5185\u5bb9\u5339\u914d\u5230\u5df2\u77e5\u7684\u6076\u610f\u7ad9\u70b9\uff0cnetwork thread \u4f1a\u5c55\u793a\u4e00\u4e2a\u8b66\u544a\u9875\u3002\u9664\u6b64\u4e4b\u5916\uff0c\u7f51\u7edc\u7ebf\u7a0b\u8fd8\u4f1a\u505a CORB\uff08Cross Origin Read Blocking\uff09\u68c0\u67e5\u6765\u786e\u5b9a\u90a3\u4e9b\u654f\u611f\u7684\u8de8\u7ad9\u6570\u636e\u4e0d\u4f1a\u88ab\u53d1\u9001\u81f3\u6e32\u67d3\u8fdb\u7a0b\u3002<\/p>\n

    \u7b2c\u56db\u6b65\uff1a\u67e5\u627e\u6e32\u67d3\u8fdb\u7a0b<\/strong><\/span><\/div>\n

    \u5404\u79cd\u68c0\u67e5\u5b8c\u6bd5\u4ee5\u540e\uff0cnetwork thread \u786e\u4fe1\u6d4f\u89c8\u5668\u53ef\u4ee5\u5bfc\u822a\u5230\u8bf7\u6c42\u7f51\u9875\uff0cnetwork thread \u4f1a\u901a\u77e5 UI thread \u6570\u636e\u5df2\u7ecf\u51c6\u5907\u597d\uff0cUI thread \u4f1a\u67e5\u627e\u5230\u4e00\u4e2a renderer process \u8fdb\u884c\u7f51\u9875\u7684\u6e32\u67d3\u3002<\/p>\n

    \u6d4f\u89c8\u5668\u4e3a\u4e86\u5bf9\u67e5\u627e\u6e32\u67d3\u8fdb\u7a0b\u8fd9\u4e00\u6b65\u9aa4\u8fdb\u884c\u4f18\u5316\uff0c\u8003\u8651\u5230\u7f51\u7edc\u8bf7\u6c42\u83b7\u53d6\u54cd\u5e94\u9700\u8981\u65f6\u95f4\uff0c\u6240\u4ee5\u5728\u7b2c\u4e8c\u6b65\u5f00\u59cb\uff0c\u6d4f\u89c8\u5668\u5df2\u7ecf\u9884\u5148\u67e5\u627e\u548c\u542f\u52a8\u4e86\u4e00\u4e2a\u6e32\u67d3\u8fdb\u7a0b\uff0c\u5982\u679c\u4e2d\u95f4\u6b65\u9aa4\u4e00\u5207\u987a\u5229\uff0c\u5f53 network thread \u63a5\u6536\u5230\u6570\u636e\u65f6\uff0c\u6e32\u67d3\u8fdb\u7a0b\u5df2\u7ecf\u51c6\u5907\u597d\u4e86\uff0c\u4f46\u662f\u5982\u679c\u9047\u5230\u91cd\u5b9a\u5411\uff0c\u8fd9\u4e2a\u51c6\u5907\u597d\u7684\u6e32\u67d3\u8fdb\u7a0b\u4e5f\u8bb8\u5c31\u4e0d\u53ef\u7528\u4e86\uff0c\u8fd9\u4e2a\u65f6\u5019\u4f1a\u91cd\u65b0\u542f\u52a8\u4e00\u4e2a\u6e32\u67d3\u8fdb\u7a0b\u3002<\/p>\n

    \u7b2c\u4e94\u6b65\uff1a\u63d0\u4ea4\u5bfc\u822a<\/strong><\/span><\/div>\n

    \u5230\u4e86\u8fd9\u4e00\u6b65\uff0c\u6570\u636e\u548c\u6e32\u67d3\u8fdb\u7a0b\u90fd\u51c6\u5907\u597d\u4e86\uff0cBrowser Process \u4f1a\u5411 Renderer Process \u53d1\u9001IPC\u6d88\u606f\u6765\u786e\u8ba4\u5bfc\u822a\uff0c\u6b64\u65f6\uff0c\u6d4f\u89c8\u5668\u8fdb\u7a0b\u5c06\u51c6\u5907\u597d\u7684\u6570\u636e\u53d1\u9001\u7ed9\u6e32\u67d3\u8fdb\u7a0b\uff0c\u6e32\u67d3\u8fdb\u7a0b\u63a5\u6536\u5230\u6570\u636e\u4e4b\u540e\uff0c\u53c8\u53d1\u9001IPC\u6d88\u606f\u7ed9\u6d4f\u89c8\u5668\u8fdb\u7a0b\uff0c\u544a\u8bc9\u6d4f\u89c8\u5668\u8fdb\u7a0b\u5bfc\u822a\u5df2\u7ecf\u63d0\u4ea4\u4e86\uff0c\u9875\u9762\u5f00\u59cb\u52a0\u8f7d\u3002<\/p>\n

    \u8fd9\u4e2a\u65f6\u5019\u5bfc\u822a\u680f\u4f1a\u66f4\u65b0\uff0c\u5b89\u5168\u6307\u793a\u7b26\u66f4\u65b0\uff08\u5730\u5740\u524d\u9762\u7684\u5c0f\u9501\uff09\uff0c\u8bbf\u95ee\u5386\u53f2\u5217\u8868\uff08history tab\uff09\u66f4\u65b0\uff0c\u5373\u53ef\u4ee5\u901a\u8fc7\u524d\u8fdb\u540e\u9000\u6765\u5207\u6362\u8be5\u9875\u9762\u3002<\/p>\n

    \u7b2c\u516d\u6b65\uff1a\u521d\u59cb\u5316\u52a0\u8f7d\u5b8c\u6210<\/strong><\/span><\/div>\n

    \u5f53\u5bfc\u822a\u63d0\u4ea4\u5b8c\u6210\u540e\uff0c\u6e32\u67d3\u8fdb\u7a0b\u5f00\u59cb\u52a0\u8f7d\u8d44\u6e90\u53ca\u6e32\u67d3\u9875\u9762\uff08\u8be6\u7ec6\u5185\u5bb9\u4e0b\u6587\u4ecb\u7ecd\uff09\uff0c\u5f53\u9875\u9762\u6e32\u67d3\u5b8c\u6210\u540e\uff08\u9875\u9762\u53ca\u5185\u90e8\u7684iframe\u90fd\u89e6\u53d1\u4e86onload\u4e8b\u4ef6\uff09\uff0c\u4f1a\u5411\u6d4f\u89c8\u5668\u8fdb\u7a0b\u53d1\u9001IPC\u6d88\u606f\uff0c\u544a\u77e5\u6d4f\u89c8\u5668\u8fdb\u7a0b\uff0c\u8fd9\u4e2a\u65f6\u5019UI thread\u4f1a\u505c\u6b62\u5c55\u793atab\u4e2d\u7684\u52a0\u8f7d\u4e2d\u56fe\u6807\u3002<\/p>\n

    \u7f51\u9875\u6e32\u67d3\u539f\u7406<\/strong><\/div>\n

    \u5bfc\u822a\u8fc7\u7a0b\u5b8c\u6210\u4e4b\u540e\uff0c\u6d4f\u89c8\u5668\u8fdb\u7a0b\u628a\u6570\u636e\u4ea4\u7ed9\u4e86\u6e32\u67d3\u8fdb\u7a0b\uff0c\u6e32\u67d3\u8fdb\u7a0b\u8d1f\u8d23tab\u5185\u7684\u6240\u6709\u4e8b\u60c5\uff0c\u6838\u5fc3\u76ee\u7684\u5c31\u662f\u5c06HTML\/CSS\/JS\u4ee3\u7801\uff0c\u8f6c\u5316\u4e3a\u7528\u6237\u53ef\u8fdb\u884c\u4ea4\u4e92\u7684web\u9875\u9762\u3002\u90a3\u4e48\u6e32\u67d3\u8fdb\u7a0b\u662f\u5982\u4f55\u5de5\u4f5c\u7684\u5462\uff1f<\/p>\n

    \u6e32\u67d3\u8fdb\u7a0b\u4e2d\uff0c\u5305\u542b\u7ebf\u7a0b\u5206\u522b\u662f\uff1a<\/p>\n

  • \u4e00\u4e2a\u4e3b\u7ebf\u7a0b\uff08main thread\uff09<\/li>\n
  • \u591a\u4e2a\u5de5\u4f5c\u7ebf\u7a0b\uff08work thread\uff09<\/li>\n
  • \u4e00\u4e2a\u5408\u6210\u5668\u7ebf\u7a0b\uff08compositor thread\uff09<\/li>\n
  • \u591a\u4e2a\u5149\u6805\u5316\u7ebf\u7a0b\uff08raster thread\uff09<\/li>\n

    \u4e0d\u540c\u7684\u7ebf\u7a0b\uff0c\u6709\u7740\u4e0d\u540c\u7684\u5de5\u4f5c\u804c\u8d23\u3002<\/p>\n

    \u6784\u5efaDOM<\/strong><\/div>\n

    \u5f53\u6e32\u67d3\u8fdb\u7a0b\u63a5\u53d7\u5230\u5bfc\u822a\u7684\u786e\u8ba4\u4fe1\u606f\u540e\uff0c\u5f00\u59cb\u63a5\u53d7\u6765\u81ea\u6d4f\u89c8\u5668\u8fdb\u7a0b\u7684\u6570\u636e\uff0c\u8fd9\u4e2a\u65f6\u5019\uff0c\u4e3b\u7ebf\u7a0b\u4f1a\u89e3\u6790\u6570\u636e\u8f6c\u5316\u4e3aDOM\uff08Document Object Model\uff09\u5bf9\u8c61\u3002<\/p>\n

    DOM\u4e3aWEB\u5f00\u53d1\u4eba\u5458\u901a\u8fc7JavaScript\u4e0e\u7f51\u9875\u8fdb\u884c\u4ea4\u4e92\u7684\u6570\u636e\u7ed3\u6784\u53caAPI\u3002<\/p>\n

    \u8d44\u6e90\u5b50\u52a0\u8f7d<\/strong><\/div>\n

    \u5728\u6784\u5efaDOM\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u89e3\u6790\u5230\u56fe\u7247\u3001CSS\u3001JavaScript\u811a\u672c\u7b49\u8d44\u6e90\uff0c\u8fd9\u4e9b\u8d44\u6e90\u662f\u9700\u8981\u4ece\u7f51\u7edc\u6216\u8005\u7f13\u5b58\u4e2d\u83b7\u53d6\u7684\uff0c\u4e3b\u7ebf\u7a0b\u5728\u6784\u5efaDOM\u8fc7\u7a0b\u4e2d\u5982\u679c\u9047\u5230\u4e86\u8fd9\u4e9b\u8d44\u6e90\uff0c\u9010\u4e00\u53d1\u8d77\u8bf7\u6c42\u53bb\u83b7\u53d6\uff0c\u800c\u4e3a\u4e86\u63d0\u5347\u6548\u7387\uff0c\u6d4f\u89c8\u5668\u4e5f\u4f1a\u8fd0\u884c\u9884\u52a0\u8f7d\u626b\u63cf\uff08preload scanner\uff09\u7a0b\u5e8f\uff0c\u5982\u679c\u5982\u679cHTML\u4e2d\u5b58\u5728img\u3001link\u7b49\u6807\u7b7e\uff0c\u9884\u52a0\u8f7d\u626b\u63cf\u7a0b\u5e8f\u4f1a\u628a\u8fd9\u4e9b\u8bf7\u6c42\u4f20\u9012\u7ed9Browser Process\u7684network thread\u8fdb\u884c\u8d44\u6e90\u4e0b\u8f7d\u3002<\/p>\n

    JavaScript\u7684\u4e0b\u8f7d\u4e0e\u6267\u884c<\/strong><\/div>\n

    \u6784\u5efaDOM\u8fc7\u7a0b\u4e2d\uff0c\u5982\u679c\u9047\u5230