Skip to main content

Fixing XHTML Parsing Error on Chrome: Specification mandate value for attribute async

This error message on Google Chrome console:

Specification mandate value for attribute async

That would happen if we generated XML page which acted as HTML, or XHTML. And we forgot to define the value for a particular HTML element attribute.

In this case, the value for async attribute (in script element).


The "async" Attribute Strictly Needs Value in XHTML

Earlier, it was like this:

And the XHTML page wouldn't be rendered. It was just blank, but still with the XML attached (if we view the page source/inspect element).


Solution

To fix that, put the value for that attribute. We can put async, 1, or true for that.

Use async:

Or use 1:

Or use true:


Other Browsers

It will have different error message. But that's the general method to fix it.

BREAD

Above is a posing bread humanoid plumber with dubious fingers and sinks which are covered by the countertop. Wild indeed. You cannot unsee and forget this (Jedi hand movements).

Last modified on

Comments

Monkey Raptor uses cookies or biscuits 🍪 for analytics, functionality, and advertisements. More info in Privacy Policy