Monkey Raptor

Sunday, November 1, 2015

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).


It looked like this

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).


The solusheeon

To fix that, put the value for that attribute. Like so:

Or:


On other browser

On Firefox or IE10+ or Safari or other, it has different error message. But that's the general method to fix it.

Fixing XHTML Parsing Error on Chrome: "Specification mandate value for attribute async"
https://monkeyraptor.johanpaul.net/2015/11/fixing-xhtml-parsing-error-on-chrome.html

No comments

Post a Comment

Tell me what you think...