跖疣用什么药膏能治好| 怕是什么生肖| 干扰素是治什么病的| 1979年属什么生肖| 甲状腺滤泡性肿瘤是什么意思| 15一16岁青少年腰疼是什么病| 子字属于五行属什么| 倍增是什么意思| 穷的生肖指什么生肖| 红加绿等于什么颜色| 床单什么颜色有助于睡眠| 原因是什么| 社会公德的主要内容是什么| 鞑虏是什么意思| 饕餮长什么样子| 刚产下的蚕卵是什么颜色| 51年属什么生肖| 掉头发挂什么科| 脸上经常长痘痘是什么原因| 心脏不舒服挂什么科室| xxx是什么意思| 低筋面粉是什么面粉| 91年五行属什么| 喝什么茶能降血压| 属龙的和什么属相最配| 老佛爷是什么意思| 蒋字五行属什么| 留置针是什么| 哈利波特是什么意思| pde是什么意思| 什么变什么化| gn是什么单位| 盐和小苏打一起有什么作用| 小腿麻木是什么原因引起的| 什么是萎缩性胃炎| 填充鼻子最好的材料是什么| 什么叫外阴白斑| 白带什么时候来| 10月21日什么星座| 生肖本命带红花是什么生肖| nag是什么意思| 应无所住而生其心什么意思| 月经量少吃什么排淤血| 为什么叫汉族| 生姜和红枣煮水喝有什么作用| 胃镜后吃什么| 3月30日是什么星座| 复机是什么意思| 眼干是什么原因| 血尿酸偏高是什么原因| 减肥早餐吃什么最好| bm什么意思| 女孩第一次来月经需要注意什么| 毕业送什么礼物给老师| 冲锋陷阵是什么生肖| 查血型挂什么科| 常喝柠檬水有什么好处和坏处| 肠易激综合征吃什么中成药| 什么芒果好吃| 什么饮料可以解酒| 防晒霜和防晒乳有什么区别| 送女生礼物送什么好| 4月13号是什么星座| chick什么意思| fa是什么| 璋字五行属什么| 38是什么意思| 厨子什么意思| 砷对人体有什么危害| 什么是对称轴| 黄豆煲汤搭配什么最好| 舌吻会传染什么病| 吃什么排肝毒最快| 什么叫宫腔粘连| 西红柿和什么搭配最好| 大腿疼是什么原因| 风的孩子叫什么| 尿多尿频是什么原因造成的| 便黑色大便是什么情况| 哪吒的妈妈叫什么| 淋巴细胞数高说明什么| 1990属什么生肖| 急性扁桃体炎什么原因导致的| 一什么边| 所见的意思是什么| 2028什么年| 处女座属于什么星象| 什么木头有香味| 左胳膊发麻是什么原因| 鱼平念什么| 什么情况要割包皮| 7月14日什么节日| 娘是什么意思| 横眉冷对是什么意思| 草字头下面一个高字读什么| 淋巴滤泡增生是什么意思| 吃什么补充维生素b1| 骨转移是什么意思| 黄河里有什么鱼| 碳酸氢钠是什么| 骨质增生是什么原因引起的| 手牵手我们一起走是什么歌| 女生白带是什么| 打破伤风不能吃什么| 脸大适合什么发型| 奔是什么生肖| 漏尿吃什么药| 三焦湿热吃什么中成药| 蜂蜜和柠檬一起喝有什么作用| 现在是什么季节| 为什么有的人特别招蚊子| 高血压是什么| 醋泡脚有什么好处| 守护者是什么意思| 一个斤一个页念什么| 凤梨跟菠萝有什么区别| 水晶粉是什么原料做的| 送情人什么礼物最好| 篮子是什么意思| 囡是什么意思| 男人后背有痣代表什么| 当兵什么时候体检| 增强免疫力吃什么维生素| 造诣是什么意思| 肝是干什么用的| 嘴角上扬是什么意思| 阴吹是什么意思| 长智齿牙龈肿痛吃什么药| 什么鱼好养| rarone是什么牌子的手表| 匹夫是什么意思| 1007是什么星座| 右侧附件区囊性回声是什么意思| 海东青是什么| 食品级pp材质是什么| 梦见旋风是什么预兆| 中午12点到1点是什么时辰| 屁股痛是什么引起的| 女人左手麻要注意什么| 热锅上的蚂蚁是什么意思| 什么是元素| 孕妇吃什么补血| 血糖高吃什么可以降下来| 手抖是什么病的症状| 权衡是什么意思| 摩羯后面是什么星座| 老赖什么意思| 纯粹什么意思| 肠道肿瘤有什么症状| 镀金什么意思| 手电筒的金属外壳相当于电路中的什么| 社康是什么| 报销什么意思| 睾丸痛什么原因| 经期喝咖啡有什么影响| 吃什么减肥瘦肚子| 宝贝什么意思| 膨鱼鳃用什么搭配煲汤| 肚子胀气吃什么药| 什么是易孕体质| swisse是什么药| 皮肤自愈能力差缺什么| 胆囊充盈欠佳什么意思| 破瓦法是什么| 半夜腿抽筋是什么原因| 有鳞状细胞是什么意思| 用什么药膏能拔去粉瘤| 琼字代表什么生肖| 扁桃体发炎吃什么药比较好| 收支两条线是什么意思| 山药什么季节成熟| 越国在现在的什么地方| 无赖不还钱最怕什么| 阑尾炎手术后吃什么| 在下是什么意思| 香蕉和什么一起吃能减肥| 唯我独尊是什么生肖| 小孩吃什么通便降火| 博字五行属什么| 茶话会是什么意思| 切莫是什么意思| 河北有什么特产| 木瓜和什么不能一起吃| 小蝌蚪吃什么| 坐月子吃什么菜| 阿司匹林什么时间吃最好| 89年五行属什么| 火车头是什么意思| 黄牌是什么意思| 什么的彩虹| 直落是什么意思| 晚上为什么不能剪指甲| 舌根放血有什么好处| 北京市长属于什么级别| 李连杰什么病| crp高是什么意思| 噩耗是什么意思| 四海是什么意思| 胆汁反流有什么症状| 1987年属什么| 算计是什么意思| 不以规矩下一句是什么| 什么是尿酸| 清洁度1度是什么意思| 妇科养荣胶囊主治什么| 屌丝是什么| 妈妈的外婆叫什么| 小儿舌苔白厚什么原因| 命中劫是什么意思| 痔疮手术后可以吃什么| 角的大小与什么有关与什么无关| 什么是多巴胺| 头响脑鸣是什么原因引起的| 火韦是什么字| 开背是什么意思| cba是什么| 玉林狗肉节是什么时候| 什么是睡眠障碍| 什么是一线城市| 子宫内膜增厚吃什么药| 为什么会被限制高消费| 斑秃是什么原因| 血常规能查出什么| alexanderwang是什么牌子| 西双版纳有什么好玩的| 都有什么血型| 索是什么意思| 尿有泡沫是什么原因| 情商低是什么意思| 葡萄糖是什么糖| olp是什么意思| 五月七日是什么星座| 游泳对身体有什么好处| 蜜饯是什么东西| 柠檬什么时候成熟| 天才是什么意思| 吃完油炸的东西后吃什么化解| 刺梨果有什么功效| 荨麻疹吃什么药好| 竣字五行属什么| 脚冰凉是什么原因| 肿瘤前期出现什么症状| 木可以加什么偏旁| 过敏痒用什么药膏| 胃反酸是什么原因造成的| 8月1日什么星座| pv值是什么意思| 七月初八是什么星座| 石膏的主要成分是什么| 吃什么对皮肤好| 状元是什么意思| 拉青色大便是什么原因| 中堂相当于现在什么官| 农历正月初一是什么节| 感冒流鼻涕咳嗽吃什么药好| ct与核磁共振有什么区别| 什么的雪花| 去湿气吃什么食物好| 为什么会长水泡| 眉毛旁边长痘痘是什么原因| 防风通圣颗粒治什么病| 风湿免疫科是看什么病的| karen是什么意思| 百废待兴是什么意思| 百度
Skip to content

shivanigithub/http-cache-partitioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

?

History

18 Commits
?
?
?
?

Repository files navigation

Table of Contents

Explainer - Partition the HTTP Cache

Introduction

Chrome’s HTTP cache is currently shared across all sites, with a single namespace for all resources regardless of which site the resource is fetched from. This opens the browser to a side-channel attack where one site can detect if another site has loaded a resource by checking if it’s in the cache. Such exploits have been demonstrated in the wild.

Here, we propose to partition the HTTP cache to prevent documents from one site from knowing if a resource from a cross-origin document load was cached or not. The exact key used to partition on is described later in the explainer. Firefox has also published an intent to implement to partition their cache, and Safari has partitioned their cache for several years now.

Such partitioning limits the reusability of third-party resources. Each site will need to load those third party resources (such as fonts or scripts) for themselves at least once. Chrome’s experiments with partitioning show that the overall network usage increases by around 4% (more details below) and first/largest contentful paint increase around 0.3%.

Goals

The goal is to isolate sites such that one site can't communicate with another via the cache.

Doing so prevents cache attacks such as the following:

  • Cross-site search attack: There exist cross site search attack proofs-of-concept which exploit the fact that some popular sites load a specific image when a search result is empty. By opening a tab and performing a search and then checking for that image in the cache, an adversary can detect if an arbitrary string is in the user’s search results.

  • Detect if a user has visited a specific site: If the cached resource is specific to a particular site or to a particular cohort of sites, an adversary can detect user’s browsing history by checking if the cache has that resource.

  • Tracking: In addition to the above cache attacks, the cache can also be used to store cross-site super-cookies as a tracking mechanism. To clear them the user has to delete their entire cache (not just a particular site). Since such this is neither transparent nor under the user’s control, it results in tracking that doesn’t respect user choice.

Choosing the Partitioning Key

This section details the pros and cons of the various possible partitioning keys.

Partition using top frame site: Double keying

Each frame’s cache is shared with all other frames on the page and with other pages with the same top-frame site.

Benefits

  • Isolation between cross-site pages: Two top-frame documents which are not same-site will not share the cache, and therefore will not be able to determine if the other loaded a given resource.
  • Precedence in other browsers: Partitioning using top frame eTLD+1 has been implemented in Safari for over five years now.

Challenges/Limitations

This solution leads to the cache being shared across all of the subframes in a page. Thus it assumes that the top-level publisher trusts the frames that it embeds and other embedded frames trust the top level frame to only embed frames from other trustworthy publishers.

Performance impact

As mentioned in the metrics details below, preliminary experiments with partitioning show that the overall cache miss rate increases by about 2 percentage points but changes to first contentful paint aren’t statistically significant and the overall fraction of bytes loaded from the network only increase by around 1.5 percentage points.

Partition using top frame and frame site: Triple keying

Each frame’s cache is only shared with same-site frames on documents from the same top-level domain.

This solution uses both top-frame and frame domains as the cache partitioning key.

Benefits

  • Isolation between cross-site pages
  • Isolation between cross-site frames on a page Double keying will solve the cross-site search and similar security attacks between top-level pages but not between frames, which can happen if:
    • A popular site embeds a malicious cross-site iframe.
    • A malicious top-level site embeds a popular site as an iframe. This will require that the popular site does not have a framebusting defense. The fact that defense against framing is an opt-in security feature, suggests there might be some sites with user sensitive data that could be protected against such attacks using triple keying. In general, using double keying does not prevent leaking information across cross-site frames.

Challenges/Limitations

Performance.

Performance impact

Results for core metrics like first contentful paint, percentage of bytes served from the network and cache misses are the same as with double keying (mentioned in the above section).

Proposed solution

Use top-frame and subframe as keys (Triple keying)

Chrome's experiment results show that there isn't a big performance difference between double and triple keying. Since the latter provides the added security benefit between cross-site frames, Chrome plans to use triple keying.

Note that, as being discussed in this issue, even with the current triple keying solution, it may be possible to snoop on the cached subresources of other frames on the page, due to existing x-site timing leaks. By creating an iframe using the subresource url that the malicious frame is interested in and then timing the onload handler event for that iframe, it can know with some probability if the resource came from the cache or network. To mitigte this, the resource site can use the opt-in security header Content-Security-Policy: frame-ancestors 'self' or 'none'. In a future iteration, the browser may also mitigate this by default by adding a bit to the cache partitioning key that will be set for a navigation resource and will differentiate it from subresources.

Define site as scheme://eTLD+1 for the initial launch

It is likely for frames on a page to belong to the same site if not the same origin and we would like to continue giving those frames the performance benefits of caching. For this reason, we plan to go with scheme://eTLD+1 instead of origin for the initial launch. In the long term, since dependency on Publix Suffix List is not ideal, the plan is to migrate to other more sustainable mechanisms like First Party Sets or use origin with an opt-out mechanism so that frames can opt-out from triple keying to double keying, if there is a need.

Impact on metrics

This section goes into the details of metrics for the proposed partitioning approach mentioned above (triple keying with scheme://eTLD+1).

Network traffic

  • Fraction of bytes read from the network:
    • Control: 75%
    • Triple keying: 78%

Page performance

  • Navigation start to first contentful paint
    • No regressions otherwise, +0.32 (75th percentile), +0.75% (95th percentile), +0.97% (99th percentile).
  • Navigation start to largest contentful paint
    • No regressions otherwise, +0.3% at the 75th percentile.
  • Browser jankiness
    • No regression.
  • Interactive timing delay for input processing
    • No regression.
  • Third party subframes' navigation start to first contentful paint
    • +1.5% to +1.8% at the various percentiles
  • Largest contentful paint for pages with 3rd party fonts
    • +0.2% to +0.6% at the various percentiles
  • Blank text shown time (due to unavailable web font)
    • +2 to 5% at the various percentiles
  • Top 1/3rd, middle 1/3rd and tail 1/3rd sites, by usage
    • for all of these subsets, the regressions in first and largest contentful paint are <1% in most quantiles and <= 0.5% at the median.

Cache

This section gives the cache miss rates overall for all types of resources. It also gives the metric for specific types of resources like 3rd party fonts, css and js files. The 3rd party metrics is a good measure to see the impact on CDNs.

  • Total cache miss rates
    • Control: 54%
    • Triple keying: 56% (+3.6%)
  • Cache miss rates for 3rd party fonts
    • Control: 21%
    • Triple keying: 28% (+33%)
  • Cache miss rates for 3rd party javascript files:
    • Control: 29%
    • Triple keying: 34% (+16%)
  • Cache miss rates for 3rd party css files:
    • Control: 20%
    • Triple keying: 23% (+13%)
  • Cache miss rates with error ERR_CACHE_MISS (which is used for resources that can only be loaded from the cache e.g. for "only-if-cached" cases)
    • No change for main resources on all platforms and subresources on Android, and an increase from 0.21% to 0.25% for subresources only on desktop platforms.

Impact on APIs

Fetch API

The fetch API has an 'only-if-cached' mechanism that allows sites to observe if same-origin resources are in the http cache. The partitioned HTTP cache will have some cases where different caching behavior will be observable via the Fetch API. For example, consider:

  • Top level frame A with origin foo.com
  • 3P iframe B with origin foo.com in a different cross-origin tab
  • Iframe B does a normal fetch(url) to populate the http cache
  • Iframe B uses BroadcastChannel to signal to window A
  • Window A uses fetch(url, { cache: 'only-if-cached' }), but does not see the cached resource as expected since the cache is partitioned by the top-frame-origin.

Alternative solutions considered

Partition using frame only

Each frame’s cache is shared with all other same-site frames, regardless of the top-level page they’re on.

This solution only uses the request’s frame as the partitioning key.

Benefits

  • Isolation between cross-site frames: This solution isolates two different cross-site frames from their cache accesses.

Challenges/Limitations

Tracking the user across different top-level sites will be possible by storing persistent user identifiers via third party frames.

Partition using the chain of frames

Each frame’s cache is shared with other same-site frames, only if the chain of frames that nest those frames is the same.

This solution uses the request’s chain of frames as the partitioning key.

Benefits

  • Clear isolation between two different chains of frames

Challenges/Limitations

Performance. We do not have any data for this approach as of now.

Stakeholder Feedback / Opposition

  • Firefox: Public support, have sent an intent to implement.
  • Safari: Public support, have an existing implementation.
  • Web developers: This is not a breaking change, but it will have performance considerations for some organizations. For instance those that serve large volumes of highly cacheable resources across many sites (e.g., fonts and popular scripts). This needs to be balanced with the privacy and security concerns and the fact that sites often use different versions of popular libraries, reducing the benefits of such caching. It’s also worth reiterating that Safari has already partitioned its cache and that Firefox has signaled that it wants to as well.

Acknowledgements

Many thanks for the valuable feedback from:

Josh Karlin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
多巴胺是什么意思 口干口臭是什么原因引起的 猴跟什么生肖配对最好 老是想拉尿是什么原因 2018年生肖属什么
哈气是什么意思 6月6是什么节日 脂肪垫是什么 火腿肠炒什么好吃 什么助听器
大张伟原名叫什么 人工受孕和试管婴儿有什么区别 人妖是什么 甲亢吃什么好 鬼节为什么不能出去
裕字五行属什么 肝穿刺检查是什么意思 阴囊潮湿是什么症状 PT医学上是什么意思 参芪颗粒适合什么人吃
细什么细什么hcv8jop5ns8r.cn 女生下面流水是什么原因hcv8jop7ns7r.cn 包面是什么hcv9jop3ns7r.cn 98属什么cj623037.com hpv68阳性是什么意思hcv9jop6ns1r.cn
为什么针灸后越来越痛hcv9jop0ns1r.cn 风湿性关节炎用什么药效果好hcv7jop7ns3r.cn 非淋菌尿道炎用什么药hcv8jop0ns9r.cn 白牌黑字是什么车牌hcv9jop1ns3r.cn 猜忌是什么意思hcv8jop3ns1r.cn
小孩突然头疼是什么原因hcv8jop1ns6r.cn r的平方是什么意思520myf.com 梭织棉是什么面料hcv8jop7ns5r.cn 高三学生吃什么补脑抗疲劳hcv8jop7ns8r.cn 低钾血症是什么意思hcv9jop1ns3r.cn
纤支镜检查是用来查什么的hcv7jop9ns2r.cn 红油是什么油hcv8jop9ns8r.cn 湖北属于什么地区hcv8jop3ns1r.cn 肝脏低密度影是什么意思hcv8jop2ns6r.cn 震颤是什么病qingzhougame.com
百度