Professional JavaScript for Web Developers 第四版学习笔记 CHAPTER 13:Client Detection

欢欢欢欢 发表于 2021-8-15 10:26

Capability Detection 466
Safer Capability Detection 467
Using Capability Detection for Browser Analysis 468
 Detecting Feature Support 468
 Detecting Browser Identity 468
 Capability Detection Limitations 469
User-Agent Detection 470
History of User-Agent Composition 470
 Early Browsers 470
 Netscape Navigator 3 and Internet Explorer 3 471
 Netscape Communicator 4 and Internet Explorer 4 Through 8 472
 Gecko 473
 WebKit 475
 Konqueror 476
 Chrome 476
 Opera 476
 iOS and Android 478
Using User-Agent for Browser Analysis 478
 Spoofing a User-Agent 479
 Using User-Agents for Browser Analysis 479
Software and Hardware Detection 480
Browser and Operating System Identification 481
 The navigator.oscpu Property 481
 The navigator.vendor Property 481
 The navigator.platform Property 481
 The screen.colorDepth and screen.pixelDepth Properties 482
 The screen.orientation Property 482
Browser Metadata 482
 The Geolocation API 483
 Connection State and the NetworkInformation API 486
 Battery Status API 487
Hardware 489
 Processor Cores 489
 Device Memory 489
 Maximum Touch Points 489
Summary 489

-----------------------------------------------------------

navigator提供了对硬件和软件的探知能力,如定位,网络情况,电池情况,触摸屏信息,设备内存等