Rocketloader and W3C-errors


#1

Continuing the discussion from Rocketloader causing W3C-errors:
Sorry that I had to reopen this topic, but I was out for a while and couldn’t answer.
@simon: Of course, I did not notice any direct problems with our pages, but both our SEO software and the W3C validator complained when rocketloader was switched on. If they do so, I fear that search engine robots might do so, too, resulting in a downgrade in the page ranking. For us that was not worth a few milliseconds of faster loading, so we switched off the rocketloader.
The site is www.maennerscheidung.info


#2

@user387 I think this is the problem here:

    <!-- JS Scripts-->
    <!-- jQuery Js -->
    <script src="assets/js/jquery-1.10.2.js"></script>
      <!-- Bootstrap Js -->
    <script src="assets/js/bootstrap.min.js"></script>
  	 
    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js"></script>
    <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js"></script>

Can I ask you to add type="text/javascript" to each of these like so:

    <!-- JS Scripts-->
    <!-- jQuery Js -->
    <script src="assets/js/jquery-1.10.2.js" type="text/javascript"></script>
      <!-- Bootstrap Js -->
    <script src="assets/js/bootstrap.min.js" type="text/javascript"></script>
  	 
    <!-- Metis Menu Js -->
    <script src="assets/js/jquery.metisMenu.js" type="text/javascript"></script>
    <!-- Custom Js -->
    <script src="assets/js/custom-scripts.js" type="text/javascript"></script>

Then try re-enabling Rocket Loader and running the validation check again? Defining your script types properly should ensure we don’t replace the type attribute with something invalid. We are also going to improve Rocket Loader so this doesn’t happen, but this is the fix for now.


#3

Dear Simon,

thx for your efforts. I now had the time to change the js-section of my
code as you suggested.
However, the w3c-validator is still complaining: no longer with an
error, but now with the warning “the type attribute is unnecessary for
javascript resources”, so I prefer to keep the old source code and keep
rocketloader switched off.

Regards
Georg


#4

Hi Georg,

OK - just so you this type of warning can be safely ignored here, but we’ll be changing the way Rocket Loader rewrites script tags with missing type attributes and I’ll let you know when this is complete.


#5

@user387 just wanted to let you know this fix is now live - so you shouldn’t see any issues with the W3C validator and changes Rocket Loader is making to your HTML.


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.