Submit Search
Upload
Dynamic async Friendly IFrameの話
•
3 likes
•
1,225 views
S
shoishihara1
Follow
ユーザー体験を向上させるために効果的なIFrameソリューションの紹介。
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 23
Download now
Download to read offline
Recommended
弊社BigQuery節約節約事例
弊社BigQuery節約節約事例
shoishihara1
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Recommended
弊社BigQuery節約節約事例
弊社BigQuery節約節約事例
shoishihara1
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
More Related Content
Featured
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
Featured
(20)
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Dynamic async Friendly IFrameの話
1.
現状最強のIFrame DynamicasyncFriendlyIFrameの話
2.
みんな広告嫌いだよね? 画面が占領されて邪魔 押し間違い 不快な広告
3.
ウザい広告1:オーバレイ広告 上から下に降りてきて最下部に固定される 押し間違いや閲覧の邪魔に
4.
ウザい広告2:遅延挿入型のバナー広告 ヘッダー等に後から挿入される ヘッダーを押そうとして押し間違いが起こってウザい
5.
こういった広告は、主に二つの方法で挿入さ れている 1.scriptタグによるDOM操作 2.IFrameによるサードパーティコンテンツの呼び出し
6.
1.scriptタグによる実装例 広告を挿入するためのscriptタグ <script src="https://ads.js"></script> //ads.jsのコード docment.write('広告のDOM');
7.
1.scriptタグによる実装の利点 実装がとても単純 サードパーティー側(広告配信業者)が親ページの情報 を取得できる ユーザーに合わせた広告が出せるように
8.
1.scriptタグによる実装の欠点 レンダリングをブロックしてしまう onload のタイミングにも影響 サードパーティー側がDOMをいじれる 強制リダイレクト cookie情報の流出等のセキュリティリスク
9.
2.IFrameによる実装例 広告を挿入するためのiframeタグ <iframe src="https://ads.html"></iframe>
10.
2.IFrameによる実装の利点 非同期で読み込めるので、レンダリングをブロックし ない サードパーティー側の介入を受けない(同一ドメイン 制約) サードパーティー側にDOM操作される心配ない cookie盗まれる心配ない
11.
2.IFrameによる実装の欠点 IFrameの内と外でドメインが違う サードパーティー側がページの情報を取得できない 広告の最適化ができない iframe自身の操作が面倒(高さ調節とか) サードパーティー側の対応が必要
12.
まとめると・・・・ scriptタグ IFrame 広告の最適化 ○
✖ セキュリティ ✖ ○ レンダリングへの影響 ✖ △ 実装コスト ○ △ scriptタグによる実装 広告の最適化は可能だが、親ページへの悪影響を与える可能性 IFrameによる実装 親ページへの悪影響はないが、広告の最適化ができない
13.
これを解決するためのソリューションが・・・ FriendlyIFrame(通称FiF)
14.
FriendlyIFrameの実装方法 src属性をabout:blankにしたiframeを動的に生成 サードパーティのコードを呼び出すscriptタグを iframe内に設置 inDapIF=trueというフラグをiframe内に作る <iframe src="about:blank"> <html> <head></head> <body> <script src="https://ads.js"></script> <script>inDapIF
= true</script> </body> </html> </iframe>
15.
FriendlyIFrameとその他方式の比較 scriptタグ IFrame FriendlyIFrame 広告の最適化
○ ✖ ○ セキュリティ ✖ ○ ✖ レンダリングへの影響 ✖ △ △ 実装コスト ○ △ ✖ FriendlyIFrameの中身は同一オリジンなので、親ペ ージにアクセス可能 FriendlyIFrameはIFrameの一つなので、非同期で読 み込める
16.
IFrame/FriendlyIFrameの弱点1 レンダリングへの悪影響がないわけではない 例えば・・・ 親サイトのonloadイベントが遅れる IFrameのonloadイベントが全て終わってから、 親ページのonloadイベントが発生 全てのonloadイベントが終わるまでブラウザイ ンジゲーターが回り続ける
17.
これを解決するためのソリューションが・・・ DynamicAsyncIFrame(DAiF)
18.
DynamicasyncIFrameの実装 srcを空にしたIFrameを設置しておく IFrameのonloadイベントを上書きして、onloadイ ベントの中でサードパーティーのスクリプトタグを挿 入する <iframe src="" id="frame"></iframe> <script> const
ifrm = getElementById("frame"); ifrm.contentWindow.document.open().write('<body onload="' 'var d = document;d.getElementsByTagName('head')[0].' + 'appendChild(d.createElement('script')).src' + '=広告のURL">'); </script>
19.
DynamicasyncIFrameを他の手法と比較 scriptタグ IFrame FiF
DAiF 広告の最適化 ○ ✖ ○ ✖ セキュリティ ✖ ○ ✖ ○ レンダリングへの影響 ✖ △ △ ○ 実装コスト ○ △ ✖ △ DynamicasyncIFrameはIFrameのonloadイベントが 終了してからIFrameの中身を読み込むので、親ページの onloadを妨げない
20.
そして、FiFとDAiFの合わせ技が・・・ 最強のIFrame DynamicasyncFriendlyIFrame(DAFiF)
21.
他の手法との比較 scriptタグ FiF DAiF
DAFiF 広告の最適化 ○ ○ ✖ ○ セキュリティ ✖ ✖ ○ ✖ レンダリングへの影響 ✖ △ ○ ○ 実装コスト ○ ✖ △ ✖ ✖ セキュリティ面以外は最強(ただし実装コスト・・・)。
22.
現状最強の広告表示IFrame DynamicasyncFriendlyIFrameの話 終わり
23.
おまけ 真に最強のIFrame DynamicasyncSafeFrame(DASF) scriptタグ FiF DAiF
DAFiF DASF 広告の最適化 ○ ○ ✖ ○ ○ セキュリティ ✖ ✖ ○ ✖ ○ レンダリングへの影響 ✖ △ ○ ○ ○ 実装コスト ○ ✖ △ ✖ ✖ ✖ ✖ ✖
Download now