Press enter or click to view image in full size![]()
直接嵌入 iframe 對網頁效能有害
Oct 12, 2022
一般來說大家習慣在網頁上嵌入 YouTube 或是 third-party resource 像是 Twitter 的貼文,以至於我們寫範例常用的 CodeSandbox,大部分都是以 iframe 嵌入網頁的方式來使用,原因不外乎簡單好用又方便。但你是否曾經想過這些 iframe 事實上相當吃資源,且讓你的使用者數據變成數位廣告投遞的來源的風險。
文章記錄在個人 blog,未來文章內容都會放在 blog,Medium 主要拿來做訂閱推播使用 https://jason-memo.dev/posts/embeding-iframe-directly-considered-harmful-for-perf/
