Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Working with multiple domains
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kristian PD
September 13, 2012
Programming
140
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Working with multiple domains
Brief overview of many considerations related to dealing with multiple domains.
Kristian PD
September 13, 2012
More Decks by Kristian PD
See All by Kristian PD
batman.js state of the union
kristianpd
1
170
Other Decks in Programming
See All in Programming
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
240
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
190
数百円から始めるRuby電子工作
tarosay
0
150
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
360
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
490
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
780
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
870
Google Apps Script で Ruby を動かす
kawahara
0
220
源内ハンズオン概要編
hideg
0
170
AIが無かった頃の素敵な出会いの話
codmoninc
1
430
仕様駆動開発の消費期限
watany
20
8.2k
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
480
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Navigating Weather and Climate Data
rabernat
0
470
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
460
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
280
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
770
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Paper Plane
katiecoart
PRO
2
53k
ラッコキーワード サービス紹介資料
rakko
1
4.3M
Automating Front-end Workflow
addyosmani
1369
210k
Navigating Team Friction
lara
192
16k
Transcript
WORKING WITH multiple DOMAINS Tuesday, 18 September, 12
What do we want to do? Tuesday, 18 September, 12
What do we want to do? track customers Tuesday, 18
September, 12
What do we want to do? track customers get external
content Tuesday, 18 September, 12
What do we want to do? track customers get external
content update data in realtime Tuesday, 18 September, 12
What can we use? Tuesday, 18 September, 12
What can we use? cookies Tuesday, 18 September, 12
What can we use? cookies pixels Tuesday, 18 September, 12
What can we use? cookies iframes pixels forms Tuesday, 18
September, 12
What can we use? cookies jsonp cors iframes pixels forms
Tuesday, 18 September, 12
can’t we all just get along? Tuesday, 18 September, 12
the internet is a mean place Tuesday, 18 September, 12
same origin policy Tuesday, 18 September, 12
http://shop.myshopify.com/admin Tuesday, 18 September, 12
http://shop.myshopify.com/admin protocol host (port) MUST MATCH Tuesday, 18 September, 12
it’s not that bad Tuesday, 18 September, 12
http != https Tuesday, 18 September, 12
http != https Tuesday, 18 September, 12
http != https Tuesday, 18 September, 12
http != https proxy Tuesday, 18 September, 12
<iframe> http != https Tuesday, 18 September, 12
<iframe> http != https http + https = Tuesday, 18
September, 12
<iframe> http != https http + https = https +
http = Tuesday, 18 September, 12
protocol independent URL http != https //shop.myshopify.com Tuesday, 18 September,
12
how can we use this? Tuesday, 18 September, 12
COOKIES Tuesday, 18 September, 12
Set-Cookie: foo=bar; Domain=.myshopify.com; Path=/; Expires=Fri, 14-Sep-2020; cookie data REVIEW Tuesday,
18 September, 12
Set-Cookie: foo=bar; Domain=.myshopify.com; Path=/; Expires=Fri, 14-Sep-2020; domain REVIEW Tuesday, 18
September, 12
Set-Cookie: foo=bar; Domain=.myshopify.com; Path=/; Expires=Fri, 14-Sep-2020; expiry REVIEW Tuesday, 18
September, 12
Set-Cookie: session_id=abc123; Domain=shop.myshopify.com; Path=/admin; Secure; HttpOnly https only REVIEW Tuesday,
18 September, 12
Set-Cookie: session_id=abc123; Domain=shop.myshopify.com; Path=/admin; Secure; HttpOnly no javascript REVIEW Tuesday,
18 September, 12
3rd party cookies Tuesday, 18 September, 12
3rd party cookies can be disabled Tuesday, 18 September, 12
<iframe> + <form> POST HACK Tuesday, 18 September, 12
cross-domain ...asynchronously Tuesday, 18 September, 12
JSONP JSON with Padding Tuesday, 18 September, 12
JSONP browser requests Tuesday, 18 September, 12
server renders JSON with Padding JSONP Tuesday, 18 September, 12
javascript is returned JSONP Tuesday, 18 September, 12
CORS Cross-origin-resource-sharing Tuesday, 18 September, 12
CORS Access-Control-Allow-Origin: https://shop.myshopify.com Tuesday, 18 September, 12
Access-Control-Allow-Headers: GET, POST, PUT, DELETE Content-Type: application/json CORS Access-Control-Allow-Origin: https://shop.myshopify.com
Tuesday, 18 September, 12
postMessage Tuesday, 18 September, 12
postMessage sending Tuesday, 18 September, 12
postMessage sending Reference to the other window Tuesday, 18 September,
12
postMessage sending Data you want to send Tuesday, 18 September,
12
postMessage sending Origin of the target window Tuesday, 18 September,
12
postMessage sending Origin of the target window be explicit, avoid
* Tuesday, 18 September, 12
postMessage receiving Tuesday, 18 September, 12
postMessage receiving be explicit, avoid * Tuesday, 18 September, 12
thanks Tuesday, 18 September, 12