Title: AMP extension doesn&#8217;t remove script tag
Last modified: January 31, 2022

---

# AMP extension doesn’t remove script tag

 *  Resolved [bspaceships](https://wordpress.org/support/users/bspaceships/)
 * (@bspaceships)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/amp-extension-doesnt-remove-script-tag/)
 * There’s a script tag that’s added on every page by our theme including AMP pages.
   We were hoping this plugin extension for AMP could remove it from AMP pages but
   the issue seems to persist. This script tag is keeping our AMP pages from being
   indexed by Google.
 * Example URL is below:
 * [https://www.devinebath.com/blog/forget-trendy-designing-trendproof-bathrooms-and-kitchens-that-will-last/amp](https://www.devinebath.com/blog/forget-trendy-designing-trendproof-bathrooms-and-kitchens-that-will-last/amp)
 * The script tag appears just above the closing body tag:
 * <script type=”text/javascript”>(function() {window.addEventListener(“load”,function(){
   var elem = document.getElementById(“thegem-preloader-inline-css”); if (elem!=
   =null) setTimeout(function() {elem.parentNode.removeChild(elem)}, 300); });})();
   </script>
 * Is the plugin AMP extension designed to deal with this sort of issue? All help
   appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Famp-extension-doesnt-remove-script-tag%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/amp-extension-doesnt-remove-script-tag/#post-15314873)
 * Hello [@bspaceships](https://wordpress.org/support/users/bspaceships/)
 * Thank you for reaching out and I am happy to assist you with this.
    The W3 Total
   Cache AMP extension is designed to add compatibility for accelerated mobile pages(
   AMP) to minify. The extension does not add or remove the AMP URL Postfix ?amp
   or /amp/ This is being added by the AMP plugin you are using. I would advise 
   reaching out to the support of the AMP plugin you are using as this is not related
   to W3 Total Cache. Thanks!

Viewing 1 replies (of 1 total)

The topic ‘AMP extension doesn’t remove script tag’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/amp-extension-doesnt-remove-script-tag/#post-15314873)
 * Status: resolved