Open nternetinspired opened 12 years ago
Whilst not strictly wrong, type attributes on assets such as .js and .css, as included here: https://github.com/Joomla3-Admin-template/joomla-cms/blob/template9/libraries/joomla/document/html/renderer/head.php#L121 are simply not required any more.
Browsers are smart enough now to know that file.js is a Javascript file without being told that. Moreover, they check that is the case; http://dev.w3.org/html5/spec/single-page.html#the-link-element
I see there is already code to determin doctype if ($document->isHtml5()) in the same file, so this would seem (I am not a coder!) to be a fairly simple proposition to remove these for html documents.
See: http://html5doctor.com/avoiding-common-html5-mistakes/ for a human-readable explanation of the html5 spec!
Whilst not strictly wrong, type attributes on assets such as .js and .css, as included here: https://github.com/Joomla3-Admin-template/joomla-cms/blob/template9/libraries/joomla/document/html/renderer/head.php#L121 are simply not required any more.
Browsers are smart enough now to know that file.js is a Javascript file without being told that. Moreover, they check that is the case; http://dev.w3.org/html5/spec/single-page.html#the-link-element
I see there is already code to determin doctype if ($document->isHtml5()) in the same file, so this would seem (I am not a coder!) to be a fairly simple proposition to remove these for html documents.
See: http://html5doctor.com/avoiding-common-html5-mistakes/ for a human-readable explanation of the html5 spec!