Skip to Content
MOBILE HTML5學習手冊
book

MOBILE HTML5學習手冊

by Estelle Weyl
June 2014
Intermediate to advanced
488 pages
9h 56m
Chinese
GoTop Information, Inc.
Content preview from MOBILE HTML5學習手冊
響應式 Web CSS 功能
|
363
用戶端提示
目前
Client-Hints
還沒有被實作出來,甚至還在草案規格表單中。但是因為它們即將問
世,而且當它們出現時,將會是個非常棒的功能,所以我要在這裡介紹它。
Client-Hints
是瀏覽器連同請求標頭一起傳送給伺服器的提示。當它獲得支援之後,
預計會傳送三個值:
dpr
dw
dh
,代表設備像素比(device pixel ratio)、設備寬度
device width)與設備高度(device height):
Client-Hints: dh=1280, dw=768, dpr=2.0
瀏覽器將可以透過請求標頭來提示伺服器,接著伺服器可以根據瀏覽器規格來傳送最適
當的圖像大小。
這看起來有點像是使用者代理監聽(user-agent sniffing):因為開發人員使用大量的 UA
監聽,瀏覽器製造商會加入彼此的字串,來互相支援,並忽略部署在無數個網站上面的
不完整 UA 監聽。預期
Client-Hints
不會有這種問題,因為沒有人會為了減少頻寬消耗
而謊報設備的高與寬。
363
364
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

JAVASCRIPT網頁應用程式設計

JAVASCRIPT網頁應用程式設計

Alex MacCaw

Publisher Resources

ISBN: 9789863471240