Title: Preload AMP runtime
Last modified: November 24, 2021

---

# Preload AMP runtime

 *  Resolved [zo](https://wordpress.org/support/users/zotezo/)
 * (@zotezo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-amp-runtime-2/)
 * I am facing AMP page experience issue in some pages and showing Preload AMP runtime
   error, which is reducing our LCP score.
    How to fix those issues?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpreload-amp-runtime-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-amp-runtime-2/#post-15099256)
 * Hello [@zotezo](https://wordpress.org/support/users/zotezo/)
 * Thank you for the support topic, as we mentioned in a [similar support topic](https://wordpress.org/support/topic/amp-page-experience-preload-amp-runtime-error/)
   you previously created
 * You can ignore that. It’s obsolete. See [https://github.com/ampproject/amp-toolbox/issues/1255](https://github.com/ampproject/amp-toolbox/issues/1255)
 *  Thread Starter [zo](https://wordpress.org/support/users/zotezo/)
 * (@zotezo)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-amp-runtime-2/#post-15103462)
 * How can I ignore as due to this My Pagespeed Score decreases and Page Experience
   also not good.
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-amp-runtime-2/#post-15104362)
 * [@zotezo](https://wordpress.org/support/users/zotezo/)
 * Please add the following code in your active themes functions.php or in a custom
   plugin
 *     ```
       /**
        * Preload AMP runtime scripts.
        */
       function amp_preload_amp_runtime() {
       	echo sprintf( '<link as="script" href="%s" rel="preload" crossorigin="anonymous">', esc_url( 'https://cdn.ampproject.org/v0.js' ) );
       	echo sprintf( '<link as="script" href="%s" rel="preload" crossorigin="anonymous">', esc_url( 'https://cdn.ampproject.org/v0.mjs' ) );
       }
   
       add_action( 'wp_head', 'amp_preload_amp_runtime' );
       add_action( 'amp_post_template_head', 'amp_preload_amp_runtime' );
       ```
   
 * Hope this helps!
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-amp-runtime-2/#post-15116141)
 * I would omit this:
 * `echo sprintf( '<link as="script" href="%s" rel="preload" crossorigin="anonymous"
   >', esc_url( 'https://cdn.ampproject.org/v0.js' ) );`
 * It’s only relevant to IE11 visitors.
 * For preloading `v0.mjs`, it should probably be a `modulepreload` link instead
   of a `preload` one.
 * Nevertheless, we found that the preload actually slows down rendering so we removed
   it in [https://github.com/ampproject/amp-toolbox-php/issues/17](https://github.com/ampproject/amp-toolbox-php/issues/17)
 * See my findings:
    [https://github.com/ampproject/amp-wp/issues/6182#issuecomment-865363567](https://github.com/ampproject/amp-wp/issues/6182#issuecomment-865363567)
   [https://github.com/ampproject/amp-wp/issues/6182#issuecomment-867333175](https://github.com/ampproject/amp-wp/issues/6182#issuecomment-867333175)
 *  Plugin Support [Milind More](https://wordpress.org/support/users/milindmore22/)
 * (@milindmore22)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/preload-amp-runtime-2/#post-15140324)
 * [@zotezo](https://wordpress.org/support/users/zotezo/)
    As we didn’t receive 
   a response I’ll mark this as resolved. Feel free to open a [new support topic](https://wordpress.org/support/plugin/amp/#new-post)
   if you require any further assistance.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Preload AMP runtime’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Milind More](https://wordpress.org/support/users/milindmore22/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/preload-amp-runtime-2/#post-15140324)
 * Status: resolved