0

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"?

0

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')) {
            window.location.reload();
        } else {
            window.location.href = 'https://www.edgestickers.co.uk/cms/index/noCookies/';
        }
    }
    $('notice-cookie-block').show();
    /* ]]> */
</script>

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

1
  • 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 '17 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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