Title: Invalid Script&gt; pwa-main-script-js
Last modified: November 28, 2020

---

# Invalid Script> pwa-main-script-js

 *  Resolved [markva](https://wordpress.org/support/users/markva/)
 * (@markva)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/invalid-script-pwa-main-script-js/)
 * I am testing a new WP site, pure AMP. I am using this AMP plugin: [https://github.com/ampproject/amp-wp/graphs/contributors](https://github.com/ampproject/amp-wp/graphs/contributors)
 * Sitewide, I have no other errors whatsoever.
 *  AMP does not allow the use of JS <script> tags unless they are for loading AMP
   components, which are added automatically by the AMP plugin. For any page to 
   be served as AMP, all invalid script tags must be removed from the page. Instead
   of custom or third-party JS, please consider using AMP components and functionality
   such as amp-bind and actions and events (as opposed to JS event handler attributes
   like onclick). Some custom JS can be added if encapsulated in the amp-script.
   Learn more about how AMP works.
 *  If all invalid markup is “removed” the page will be served as AMP. However, 
   the impact that the removal has on the page must be assessed to determine if 
   the result is acceptable. If any invalid markup is “kept” then the page will 
   not be served as AMP.
    Error code DISALLOWED_TAG Invalid markup <script … > Element
   attributes type text/javascript src [https://mysite.net/pwa-register-sw.js](https://mysite.net/pwa-register-sw.js)
   id pwa-main-script-js Element name script Parent element body Sources

Viewing 1 replies (of 1 total)

 *  Plugin Author [Magazine3](https://wordpress.org/support/users/magazine3/)
 * (@magazine3)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/invalid-script-pwa-main-script-js/#post-13719219)
 * If you are using “AMP by Automattic” plugin and you want PWA functionality then
   you need to install “[AMPforWP](https://wordpress.org/plugins/accelerated-mobile-pages/)”
   plugin.
 * For reference please check this tutorial: [https://ampforwp.com/tutorials/article/guide-to-amp-by-automattic-compatibility-in-ampforwp/](https://ampforwp.com/tutorials/article/guide-to-amp-by-automattic-compatibility-in-ampforwp/)

Viewing 1 replies (of 1 total)

The topic ‘Invalid Script> pwa-main-script-js’ is closed to new replies.

 * ![](https://ps.w.org/pwa-for-wp/assets/icon-256x256.png?rev=1939317)
 * [PWA for WP - Progressive Web Apps Made Simple](https://wordpress.org/plugins/pwa-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pwa-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pwa-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/pwa-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pwa-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pwa-for-wp/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Magazine3](https://wordpress.org/support/users/magazine3/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/invalid-script-pwa-main-script-js/#post-13719219)
 * Status: resolved