skip to Main Content

Only 3 error type left from AMP test

Custom JavaScript is not allowed. (23 instances)

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> 

The attribute ‘href’ in tag ‘link rel=stylesheet for fonts’ is set to
the invalid value. (10 instances)

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" rel="stylesheet"> 
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />

The tag ‘img’ may only appear as a descendant of tag ‘noscript’. Did
you mean ‘amp-img’? (50 instances)

For event `<img>` tag it is showing error. I have even used alt, width, height attributes properly.

I cannot solve these errors. Please someone tell me how to go through this.

Cannot open website in internet explorer also.

I am using https://search.google.com/test/amp

2

Answers


  1. AMP has strict rules you have to abide by.

    You can’t just load js. You need to use allowed scripts and components: https://amp.dev/documentation/components/

    You can’t use <img> tag, you need to use <amp-img>

    You can’t load fonts the regular way, you need to use amp-font: https://amp.dev/documentation/components/amp-font/?format=websites

    Login or Signup to reply.
  2. As already informed by another community member that your site has few mistakes causing these errors. you said that your site cannot open in Internet Explorer browser.

    If we talk about AMP browser support, this information is available on their site.

    In general we support the latest two versions of major browsers like
    Chrome, Firefox, Edge, Safari, Opera and UC Browser. We support
    desktop, phone, tablet and the web view version of these respective
    browsers.

    Beyond that, the core AMP library and built-in elements should aim for
    very wide browser support and we accept fixes for all browsers with
    market share greater than 1 percent.

    In particular, we try to maintain “it might not be perfect but isn’t
    broken”-support for IE 11, iOS 8, the Android 4.0 system browser and
    Chrome 41.

    Ref: AMP Supported Browsers

    I suggest you try to fix the existing errors and then after try to check the site in IE browser to see if it works or not.

    If the issue persists then I suggest you contact the AMP support for that issue.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search