Skip to content

Remove duplicate modules in JavaScript bundles #36291

@raoabdullah07

Description

@raoabdullah07

Description

I've checked the score of my AMP pages with Google PageSpeed Insight, and I've got the following red message "Remove duplicate modules in JavaScript bundles"

PSI results

This is the initial piece of code of my AMP pages. I started with them several years ago. Not sure if I have to remove something now.

<!doctype html>
<html  lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
    <title>Full SEO Guide 2020 - On Site SEO - On Page SEO - Off Page SEO Tips</title>
    <link rel="canonical" href="#">
    <script async src="https://cdn.ampproject.org/v0.js"></script>
    <link rel="canonical" href="#">
    <link rel="shortcut icon" type="image/x-icon" href="images/favicon.png">
    <meta name="forntEnd-Developer" content="Abdullah Yousaf">
    <meta property="og:type" content="website ">
    <!-- Chrome, Firefox OS and Opera -->
    <meta name="theme-color" content="#336699"/>
    <!-- Windows Phone -->
    <meta name="msapplication-navbutton-color" content="#336699">
    <!-- iOS Safari -->
    <meta name="apple-mobile-web-app-status-bar-style" content="#336699">
    <meta name="description" content="SmSEO is specially developed for Social Media &amp; Search Engine Optimization Guide. More than 200 SEO Ranking Factors are explained to guide you about On-Site SEO, On-Page SEO, Off-Page SEO, &amp; how to rank a website in Google Search Engine." />
<!--amp- form-->
    <script async custom-element="amp-form" src="https://cdn.ampproject.org/v0/amp-form-0.1.js"></script>
<!--accordian-->
    <script async custom-element="amp-accordion" src="https://cdn.ampproject.org/v0/amp-accordion-0.1.js"></script>
    <script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
<!--scroll to top-->
    <script async custom-element="amp-position-observer" src="https://cdn.ampproject.org/v0/amp-position-observer-0.1.js"></script>
    <script async custom-element="amp-animation" src="https://cdn.ampproject.org/v0/amp-animation-0.1.js"></script>

Checking the code of my AMP pages, I see that the 'amp-sidebar' is called just in the following pieces of code:

Reproduction Steps

https://stackoverflow.com/questions/69491974/google-amp-duplicate-js-module-in-html-google-amp-html-at-google-pagespeed-i

Relevant Logs

n/a

Browser(s) Affected

Chrome

OS(s) Affected

No response

Device(s) Affected

No response

AMP Version Affected

V0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleInactive for one year or moreType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions