AMP plugin with support of own JavaScript codes

The Accelerated Mobile Pages (AMP) generator to create Google AMP pages , the AMP plugins and the AMPHTML tag generator support the adoption of your own JavaScripts.


Integrate specific JavaScript


extension

Your own JavaScripts and iframe content can only be used in AMP pages under certain conditions.

Your own JavaScript code can only be loaded into AMPHTML if it is inserted via an iframe.

Iframes in AMPHTML (via the 'amp-iframe' tag) only accept content that has an encrypted HTTPS connection.

So if you want to use your own JavaScripts in AMPHTML, you must provide them via an HTTPS connection and then integrate them into the respective subpage of the website via Iframe, so that the Accelerated Mobile Pages Generator can also recognize your own JavaScripts and convert them to 'amp Convert -iframe 'tags and integrate them into the AMP page.

The AMPHTML generator thus recognizes the integrated iframes (including the JavaScripts), converts them into corresponding 'amp-iframe' tags, and makes the own JavaScripts contained therein available in the AMP version.

To use your own JavaScript in AMPHTML, the following conditions must be met:

  • Your own JavaScript must be accessible under HTTPS
  • Your own JavaScript must be embedded via an iframe

Advertisement