Download presentation
Presentation is loading. Please wait.
1
AMP Cache Sandeep Davu
2
What is AMP?
3
= Accelerated Mobile Pages
AMP is an open standard developed by Google to make the mobile web faster. 1 AMP HTML 2 AMP Viewer 3 AMP Cache HTML with some restrictions and AMP extensions Static layout Inline CSS No <script> tags Prefetch and Prerender AMP page in a customized iFrame. Fetch content in parallel. Only Cache and Serve AMP Content. Google and Cloudflare are the AMP Caches available for now. AMP Cache approach is a deviation from the traditional origin approach. The domain that servers the pages should have the amp page.
4
Cache AMP CACHE – URL FORMAT, VALIDATION, CACHE UPDATE Origin is not google. So validation is done to ensure that the document is indeed AMP compliant before serving and Caching.
5
Why AMP ? To give user a consistent Yahoo Experience even for third party content. To keep the user on the Yahoo Homepage
6
What More? We want to keep the content in-house
How? Host our own AMP Cache Why? Own the metrics. Do custom optimizations. Drive publishers to come to Yahoo for AMP Cache support. AMP Ecosystem is very suggestive of hosting AMP Caches. There are certain guidelines that we have to comply to be a AMP Cache.
7
AMPCache Architecturewant to be?
8
AMP Cache Layer 1 ATS AMP requests are routed through AMP Cache.
www-reuters-com.amp.yimg.com/c/s/ ATS Remap lua plugin Computes query URL to pass to validator amp-validator.yahoo.com/?url= Send the request through Caching Layer Layer 2 caching Layer Carp for sending to the right node. SWR for updating the Cache. Caches valid responses from AMP Validator.
9
AMP Validator Ensure cache only contains valid AMP pages
Express Service that uses open source amp-validator NPM package. Sends the AMP request to the origin servers based on the query URL. Validates the response before sending it back to ATS Else transforms response to display errors
10
Future Plans AMP Cache Update API
Publishers can perform CRUD operations on their cached resources in our AMP cache example-com.cdn.ampproject.com/update-cache/example.com/c/s/sample.html?amp_action=flush&_url_signature=<sig_val> Security - CSP Safeguard against XSS and data injection. Get Certified with Google CORS headers.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.