Amp Validation Error: The author stylesheet specified in tag 'script' is too long - document contains 21759 bytes whereas the limit is 10000 bytes.
If you are trying to validate your AMP HTML webpage and you see the above validation error that it means that you have exceeded the set limit that a javaScript amp-script code you can have for a page.
amp-script is the way you can run JavaScript on AMP-enabled webpages, but there is a set limit,
amp-script has the following restrictions on JavaScript file size:
Maximum of 10,000 bytes per amp-script element that uses a local script via script[type=text/plain][target=amp-script]. Maximum total of 150,000 bytes for all amp-script elements on the page.
Source: https://amp.dev/documentation/components/amp-script/#faq
- You need to remove unwanted javaScript code, try and re-write your code to make it fit 10000 bytes. If you are external libraries like bootstrap or any other UI framework, you may have to avoid it - or use alternatives.
- You can minify your JavaScript and CSS code - this really helps.
- remove div vertical scroll
- Create HTML button that looks like a href hyperlink
- Comprehensive 256 Ascii code table with Html Hex IBM Microsoft Key
- HTML5 HELLO WORLD Example
- Get HTML table td, tr or th inner content value with id or name attribute
- Adding Sub Headings to Bootstrap Header tags
- What is the doctype for HTML5?
- Chessboard with pieces using pure HTML and CSS
- Hyperlink in html (anchor tag) without a underline
- W3 : character data is not allowed here html validation error
- Fibonacci series from 1 to 500 table
- 9 Border to DIV Element in HTML Examples
- How to add multiple spaces between html page text
- How to turn off autocomplete in input fields in HTML Form
- Default speed of Marquee tag : SCROLLAMOUNT
- How to word wrap in HTML
- Force convert HTML text input to upper case
- HTML5 CSS3 Color Codes List
- How to remove old 404 pages ulrs from Google crawler
- reCaptcha Verification expired. Check the checkbox again
- All directional arrows codes for HTML
- Align html element at the center of page vertically and horizontally
- How to make a div tag clickable
- Remove Html head and body tags from ckeditor source
- Auto Refresh Webpage after every x Second or Minute using Meta Tag?
- Bash For Loop Example - Bash
- How to calculate SUM in Excel on Mac with Examples - Microsoft
- How to disable SharePoint subsite creation option for owners - SharePoint
- Android App Showing Two Toolbars Issue fix - Android
- bash: command not found error [macOS Terminal Linux, Unix or Windows] - MacOS
- Display (Show) bookmarks bar Safari - HowTos
- [Android] RuntimeException: Unable to start activity Need BLUETOOTH permission - Android
- How to change the tab color on Microsoft Excel on Mac - MacOS