I support a Magento store (on version 1.9). I changed the doctype to HTML 5 using the HTML5 head identifier.

I then removed the 'type ="text/javasscript" from all of my pages, files, scripts etc, since this is no longer necessary for HTML5.

However, when running the W3C validator (https://validator.w3.org) it shows that there is still an instance of a script tag containing "text/javascript" whereas when running a 'view page source' of this page there is no reference to this.

My site is: https://www.edgestickers.co.uk

What is causing the w3c validator to still pick up a reference to "text/javascript"?

1 Answer 1


I took a a look in your page in your page source and found this near the end of the page.

<script type="text/javascript">
    /* <![CDATA[ */
    function allowSaveCookie() {
        Mage.Cookies.set('user_allowed_save_cookie', '{"1":1}', new Date(new Date().getTime() + 31536000 * 1000));
        if (Mage.Cookies.get('user_allowed_save_cookie')) {
        } else {
            window.location.href = 'https://www.edgestickers.co.uk/cms/index/noCookies/';
    /* ]]> */

So, to answer your question to why the w3 validator is reporting a type="text/javascript"... because there is one.

  • Thank you. I now realise that I had to be in 'Incognito' mode and view the page source from there to see this extra piece of code displayed. Much appreciated!
    – Matt Cooke
    Dec 6, 2017 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.