srakaarticle.blogg.se

Iframe src
Iframe src




iframe src

It is OK to use amp-iframe for the purpose of displaying videos, Other additional features can be built in (for instance, auto-play for video players)Īmp-iframe must not be used for the primary purpose of displayingĪdvertising.This means that iframe content with unpredictable size can more often appear to the user as if it were native to the page, rather than in a scrollable frame This means getting, say, the right video thumbnail before a video loads, and reduces the coding effort to add a placeholder manually. Custom components can provide built-in placeholder images in some cases.Better resource management and performance.This is because there are many benefits to using an AMPĬomponent tailored for a specific use-case such as: The amp-iframe component should be considered a fallback if the required userĮxperience is not possible by other means in AMP, that is, there's not alreadyįor the use case. Use existing AMP components instead of amp-iframe See the "Iframe origin policy" doc for further details on allowed origins for iframes. An amp-iframe must not be in the same origin as the container unless they do not allow allow-same-origin in the sandbox attribute.An amp-iframe must only request resources via HTTPS, from a data-URI, or via the srcdoc attribute.By default, an amp-iframe is sandboxed (see details).The iframe must be either 600 px away from the top or not within the first 75% of the viewport when scrolled to the top, whichever is smaller. An amp-iframe may not appear close to the top of the document (except for iframes that use placeholder as described below).amp-iframe has several important differences from vanilla iframes that areĭesigned to make it more secure and avoid AMP files that are dominated by a Amp-iframe Using the AMP URL API AMP for E-Commerce Getting Started Payments in AMP Copy Button Custom Loading Indicators Integrating Videos in AMP an Overview Video Carousels with amp-carousel News Article External User Consent Flow amp-analytics Housing Usageĭisplays an AMP valid iframe.






Iframe src