Asynchronous java script loading is showing the following error:
Attribute name "async" associated with an element type "script" must be followed by the ' = ' character. + jsf
I found this in my JSF2.4 application which uses template file template.xhtml. The DOCTYPE is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:p="http://primefaces.org/ui">
This error goes when I use HTML 5 DOCTYPE but it causes some other errors since XHTML DTD is not found.
So I tried attribute async="async"
instead of just using async.
Then all the errors vanished.
Is this the right method to load java script asyncronously in the context like this? Please let me know if you have better methods to fix this.