• Resolved Chuckie

    (@ajtruckle)


    I was running a validation check on my website and it picked on the this recaptchaline:

    <script type='text/javascript' src='http://www.publictalksoftware.co.uk/wp-content/plugins/simple-download-monitor/js/sdm_g_recaptcha.js?ver=1'></script>
    <script type='text/javascript' src='//www.google.com/recaptcha/api.js?hl=en_GB&onload=sdm_reCaptcha&render=explicit&ver=4.9.5'></script>

    It error was:

    Media type “text/javascript” is obsolete, recommend “application/javascript” instead.

    I don’t know if this is something that needs to be looked into? Just thought I mention it. 🙂

    Great work! By the way I tried to donate and could not work out how.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, what tool did you use to run your validation check? What theme is running in your site?

    Thank you

    Thread Starter Chuckie

    (@ajtruckle)

    This is the tool:

    https://www.htmlvalidator.com/

    My theme is SEOS Video Premium.

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, this is probably related to your theme. Are you using a speed booster plugin? Or a you using a cache plugin? Or a plugin that moves the script files to the header?

    Regards

    We actually use the following WordPress function to output the JS files:

    wp_enqueue_script

    This is the WordPress recommended method of including a JS file. You can ignore that warning as WordPress will be including the file appropriately.

    Thread Starter Chuckie

    (@ajtruckle)

    I am not using any special plugins. The warning is making a suggestion to adjust your code to this:

    <script type='application/javascript' src='http://www.publictalksoftware.co.uk/wp-content/plugins/simple-download-monitor/js/sdm_g_recaptcha.js?ver=1'></script>
    <script type='application/javascript' src='//www.google.com/recaptcha/api.js?hl=en_GB&onload=sdm_reCaptcha&render=explicit&ver=4.9.5'></script>

    Sorry if their error message was not clear.

    It’s our JavaScript code but that code is being output by the following WordPress functions:

    https://developer.ww.wp.xz.cn/reference/functions/wp_register_script/
    https://developer.ww.wp.xz.cn/reference/functions/wp_enqueue_script/

    We do not manually output the code (we use the above functions to include JavaScript file to a page which is the recommended method).

    Currently WordPress uses “text/javascript” to output any JS file inclusion code. That looks correct to me.

    All the javascript code on your site (from any plugin) will be included using “text/javascript”.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘HTML Validation Results’ is closed to new replies.