W3C Javascript type issues

Discuss Search Engine Optimization in relation to Joomla! 3.x. This forum will also have discussions on SEF/SEO Joomla! 3.x extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
rihcardo
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sun May 14, 2017 4:37 am

W3C Javascript type issues

Post by rihcardo » Sat Dec 30, 2017 9:06 pm

I work at a company as SEO analyst and I am charged to make websites with W3C. I always work with Joomla. From the beginning of this month, W3C XHTML started to point out this error:"The type attribute is unnecessary for JavaScript resources".
I do not use "type" anymore in my javascript but this above error is generated inside Joomla script itself to call modules or jquery, css,etc and is not written in any Joomla file, Probably is related the way Joomla call scripts in core files.
So I need help. I am in version 3.8.3 and error still there.

fabtofu
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jan 25, 2018 3:02 pm

Re: W3C Javascript type issues

Post by fabtofu » Thu Jan 25, 2018 6:50 pm

You have to remove the

Code: Select all

<type=”text/javascript”>
and replace with:

Code: Select all

<script>

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12787
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: W3C Javascript type issues

Post by brian » Thu Jan 25, 2018 11:38 pm

It is very simple - just set the template to be html5 and then joomla will not add the type attribute

https://docs.joomla.org/DocType_header_for_templates
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

Maulikshah
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Feb 09, 2018 10:55 am

Re: W3C Javascript type issues

Post by Maulikshah » Tue Feb 13, 2018 9:53 am

While we are doing w3c validation for one of our website. We also found that type of problem in javascript, Og tag etc.

Exactly, it's not an issues. W3C validator are not compatible with latest technology updates. They have to consider this in their standard and need to add some more rules in their default algorithms.


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 3.x”