Hello everyone,
Good news - Google now provides support for video caching to all Web Stories. This feature can help reduce serving costs, less waiting, and a better end reader experience.
If you opt in, Google will try to serve videos from the Google cache before falling back to your site’s hosting, potentially reducing your video hosting costs by up to 99%.
To get started using the Google Cache to serve video, you’ll need access to the HTML of your Stories.
Mark the amp-video with the attribute cache="google".
The sources should be specified as a source child component and not through the src attribute of amp-video. Use 720p videos or higher to take advantage of all the video transcodes and adaptive bitrate algorithms.
<!-- Enable caching on this video via the attribute opt-in -->
<amp-video cache="google">
<source src="source1.mp4">
</amp-video>
Code language: HTML, XML (xml)
If the opt-in was successful, you will be able to see on the browser network tab a request to https://*.cdn.ampproject.org/mbv/s/* that returns a JSON with an empty list of sources (since the cache missed this video).
Please let us know if you launch this feature and you can reach out to us on Github or Slack via the #amp-story channel to connect.
- Web Stories Team
Ryan Warrender | Product Manager, Google | warr...@google.com | Web Story Design Tips |