0
votes

I created the amp version for my cms. Every article have different body so some have amp-instagram, antoher amp-facebook etc.

I included amp-facebook and amp-instagram scripts in head.

So I recived warning when on the page isn't amp-facebook tag but I have amp-facebook script in head.

Do I need every time to detect what i will have on page or my amp page will work even if I included all script that we can be found on every page.

Example of warning:

The tag 'amp-carousel' is missing or incorrect, but required by 'amp-carousel extension .js script'. This will soon be an error.

1

1 Answers

1
votes

That's correct. You should only import components that are actually used. This is to avoid network requests which unnecessarily slow down the page load.