6

技术周刊 2021-03-01:Firefox 86 发布,限制跨域 iframe 缓存读写

 3 years ago
source link: https://zhuanlan.zhihu.com/p/354047162
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

技术周刊 2021-03-01:Firefox 86 发布,限制跨域 iframe 缓存读写

  • Firefox 86 发布
    • CSS 中支持了 :autofill 伪类选择器,用于覆盖默认的自动填充样式,同时兼容了 :webkit-autofill
    • 支持了 Intl.DisplayNames API
    • 实验性支持了 image-set()
    • 可打开 ETP strict 模式,通过分区存储限制跨域 iframe 的存储接口读写
      • 通过 iframe 嵌入跨域内容时,Cookie 中的内容将通过顶部窗口的域名分区(eTLD+1)存储;
      • 为了避免 SSO 失效,Firefox 允许了顶级域名使用此域名在其他跨域站点中 iframe 埋下的 Cookie;
      • 当分区规则生效时,可使用 Storage Access API 来显式获得用户许可,以接触相关分区限制;
      • 受影响的接口包括 Cookie、LocalStorage 等;
      • Safari 13.1 起禁用了所有第三方站点的 Cookie 使用,仅可使用 Storage Access API 重新启用。
v2-262dad16ea006c37ea4c741bc8f71c88_720w.jpg

点评:目前已知 Google Analytics 将被跨域 iframe 限制影响

  • Vite 2.0 正式发布,相比 Webpack 有极大的编译速度提升:
    • 新版完全重构了架构,同时支持 React、Vue、Preact,并支持 Rollup 的多个插件;
    • 使用了 esbuild 进行预编译,将依赖预编译过程提速了 10 - 100 倍;
    • 增强了 CSS 支持:import 和 url 支持了 alias 和 npm 包依赖,url 将自动改写,并支持 CSS 代码分割;
    • 实验性支持了服务器端渲染;
    • 对于不支持 ESM 的浏览器,可以使用 @vitejs/plugin-legacy 进行兼容;
    • Vite 的亮点在于充分利用 ESM 加速编译,从零开始的 Demo 中,Vite React 启动只需要 3s,而 create-react-app 需要 20s
  • TypeScript 4.2 发布
      • 支持了 abstract 的 constructor 声明;
      • 不支持显式引用 .d.ts 文件了;
      • 解构值可用下划线开头的声明方式指明未使用;
      • in 操作符的右参数不再支持基础类型;
      • ...rest 类型不再强制在元组末尾了,可以使用形如 [boolean, ...string[], boolean] 的类型定义;
      • 优化了 Type Alias 的展示;
      • yield 值返回 any 将在打开 noImplicitAny 配置时报错;
      • 未直接调用的函数引用用于 ||&& 时将在打开 strictNullChecks 配置时报错;
      • 支持了 explainFiles 配置,将打印 ts 定义引入的方式;
      • 支持了 noPropertyAccessFromIndexSignature 配置,在使用未显式声明的索引时会报错;
v2-77ac78b38254d1694a98f02ec0a76b28_b.jpg
  • cron-parser 是一个适用于 Node.js 端的 crontab 数据解析库;
v2-7ca0360e73af304192a50c138bb60cc1_720w.jpg


编辑:承虎 & 审阅:一丝


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK