Pre-condition: We can assume to be at a HTML5 level a priori, quite simply because the plugin gracefully exits, if the HTML5 History API is not supported...
In HTML5, the typeattributes for scriptand styletags are superfluous when:
type="text/javascript" (for script tags)
type="text/css" (for style tags)
These have been wiped out successfully on the Ajaxify demonstration and documentation site and I am happy to say, everything still works fine instantaneously. Also, when looking at any affected tags in the site's source HTML - it seems to look much more pleasant to the naked eye. I like this simplification...
Here's the salient PHP - to be placed in the theme's function.php in a Wordpress environment
(a bit off-topic - please excuse - but I thought I'd share it, because it seems to be real gem)
Pre-condition: We can assume to be at a HTML5 level a priori, quite simply because the plugin gracefully exits, if the HTML5 History API is not supported...
In HTML5, the
type
attributes forscript
andstyle
tags are superfluous when:type="text/javascript"
(forscript
tags)type="text/css"
(forstyle
tags)These have been wiped out successfully on the Ajaxify demonstration and documentation site and I am happy to say, everything still works fine instantaneously. Also, when looking at any affected tags in the site's source HTML - it seems to look much more pleasant to the naked eye. I like this simplification...
Here's the salient PHP - to be placed in the theme's
function.php
in a Wordpress environment (a bit off-topic - please excuse - but I thought I'd share it, because it seems to be real gem)Ajaxify internally uses e.g. the following code snippets:
or
... to dynamically generate script and style tags on the fly.
What's even more reassuring is that pre-HTML5 environments could handle missing
type
tags already...so I might as well proceed and test the simplification...
Implementation - Test site
Phase 1
Phase 2
Closing, because tested implicitly several times on various sites