• Resolved Fetch Designs

    (@fetchdesigns)


    W3 Total Cache plugin is outputting invalid HTML5 that throws warnings when running through validator.w3.org. Specifically of note, the output of <script type="text/javascript> should be handled like the below modification which is based on WordPress core code…

    <?php $type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/javascript"'; ?>
    <script<?php echo $type_attr; ?>>

    The exact warning is…

    The type attribute is unnecessary for JavaScript resources.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3C Validation Throws Warnings on JavaScript’ is closed to new replies.