• Resolved Bjarne Oldrup

    (@oldrup)


    Hey! Thank you for sharing this fine plugin with the community.

    I’m curious; is there a good reason for polylang to keep the type attribute in the inline script?

    <script type='text/javascript'>?
    (function() {?
      document.cookie = "pll_language=da; path=/; secure; SameSite=Lax";?
      }());?
    </script>?

    According to the W3C HTML validator, the type attribute is not necessary, hasn’t been for a long time, and it’s the only thing, throwing a warning on my WP 6.3 websites.

    In my experience, it’s safe to remove. Even WordPress core has not used it for years.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chouby

    (@chouby)

    Hello,
    Thank you for the heads up. WordPress indeed removed it in WP 5.3, but only for themes asking it to be removed. We have not followed the move yet, but we definetely should. We will fix that in a future version.

    Thread Starter Bjarne Oldrup

    (@oldrup)

    Nice. Thank you! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘The type attribute is unnecessary for JavaScript resources’ is closed to new replies.