Web 新產品 / 新技術
web.dev
web.dev
一個能夠用來學習框架、性能、各類 Web 技術的地方
還有實戰 Codelab
正在進行多國翻譯
Lighthouse Performance Budgets
PWA Desktop
Trusted Web Activity
Perception Toolkit
web.dev/perception-…
一個工具包使用Shape Detection API去掃描條碼或者獲取實物信息
從網站的 meta 信息展現相關卡片
提供了WebAssembly版以向下兼容
Puppeteer with Firefox
可使用Firefox進行自動化了
npm i puppeteer-firefox
Web 未來可使用的新功能 / 新Web API / 新 JavaScript API 等
Chrome Only (目前爲止,沒有寫入w3c標準)
Lazy loading
在圖片和iframe中添加 loading="lazy" 屬性來讓瀏覽器自動懶加載
Chrome 75 啓用
Portals
Web Packaging
Paint Holding
同一網站切換頁面時將保持以前的繪製不會白屏一次
Chrome Canary 可預覽
Cookie Changes upcoming in Chrome 76
Chrome 正在開發的node
關聯Session: What’s New with Chrome and the Web (Google I/O ’19)webpack
Web API
開發中git
分享 -> Web Share API (Shipped) -> Web Share Target (v2) (Working)
media control on System level -> mediaSession API (Shipped)
檢測條碼與形狀 -> Shape Detection API (FaceDetect / BarcodeDetect both shipped in Chrome Canary)
App Badging (App上的數字) -> window.Badge / window.ExperimentalBadge (Origin Trial 78)
喚醒鎖 -> (Screen wake lock / System wake lock) -> Wake Lock (In Development)
文件操做 -> File Picker -> chooseFileSystemEntries (propse stage / In Development)
訪問串口設備(例如打印機) -> Serial API (Proposed API)
HID 設備訪問 -> WebHID (Proposed API / In Development)
訪問通信錄 -> Contacts Picker (Proposed API / Experimenting)
訪問安裝字體列表 -> Proposed / In Development
很快實裝github
剪貼板複製與粘貼圖片 Clipboard API
基於短信的手機號驗證流程
基於時間的推送通知API Notification Triggers API
以上內容年內實裝web
在 Chrome 中可參與試用並參與反饋 developers.chrome.com/origintrial… chrome
Web API 可在 Project hugu 參閱進度 Project hugu npm
相關Session: Unlocking New Capabilities for the Web (Google I/O ’19)瀏覽器
JavaScript API / Syntax
類的私有字段 (已實裝) - working on privatter method and getters and setters
String.prototype.matchAll (已實裝)
數字分隔 (Chrome 75)
BigInt (Chrome 74 與 Firefox nightly 與 node 實裝 & transpiler available)
Array.prototype.flat (in chrome firefox safari node)
從 Entries 反轉化爲 Object (in chrome firefox safari node )
globalThis (in chrome firefox safari node )
正在將數字排序的穩定性寫入標準
多國語言相關
Intl.RelativeTimeFormat -> today yesterday tomorrow (in chrome firefox node)
Intl.ListFormat -> ex. A, B or C (in chrome node)
Intl.DateTimeFormat -> ex. May, 5 (in chrome)
Intl.Locale -> Internal Translation (in chrome node)
Promise.allSettled (in chrome 76 nightly) / Promise.any
WeakRef and finalizers (in chrome with flags) & 寫入標準
關聯Session: What’s new in JavaScript (Google I/O ’19)服務器
經驗分享與性能提高
Chrome 想爲各個框架提供一些API這樣他們在連續執行分塊任務時同時相應用戶輸入cookie
Google 分享了他們在性能上的一些作法和建議
階段式SSR
捕獲JS徹底加載前的用戶點擊
保持初始大小的JS
交互驅動懶加載組件
創建依賴關係圖,聲明性加載功能,同時獲取數據
Google 的性能建議
懶加載
響應式圖片(根據設備像素密度等加載不一樣分辨率圖片)
圖片CDN
延遲第三方JS
移除代價巨大的庫
分離代碼
避免Web Font字體閃爍
Prefetch
Preconnect
Preload
首屏關鍵CSS
gzip -> Brotli
響應式加載JS(適應不一樣瀏覽器分別加載不一樣JS)
以及使用Lighthouse 與設定性能預算 LightWallet
相關Session: Elevating the Web Platform with the JavaScript Framework Community (Google I/O ’19) Speed at Scale: Web Performance Tips and Tricks from the Trenches (Google I/O ’19)
其餘
更多性能其餘案例、How to、以及Web內容可參照 www.youtube.com/playlist?li…