Loading speed versus validation

User 122279 Photo


Senior Advisor
14,450 posts

Some of my clients are eagerly using this site to see how fast their webpages are loading:

http://developers.google.com/speed/pagespeed/insights/

Then they often get a message saying that something is blocking the fast rendering of their site, and that 'something' very often appears to be the css file. Google's recommendation is to have a wee bit of inline css, and then link to the style sheet AFTER the </html> tag.

I have tried this. I make a small styling section in the head of the document (not inline) and then put the style sheet link at the very end (have also tried between </body> and </html>). Not all servers can handle that apparently, but some can, and Google's page speed thingie is pleased, but W3C validation is not.

As a site builder I would say that validation is more important, an end user, however, may vote for loading speed.
What would you say? Have you had to deal with this, and did you get it solved so that everyone was happy?
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2484360 Photo


Registered User
3,293 posts

Most responsive sites these days have code that is not valid, however still works. :P

This is because we have to "hack" the css to work with the different browsers, however it causes the CSS to not validate. However CSS validation and HTML validation are two separate things. Your HTML page validation is important to page load and SEO. If the website is loading in under 2 seconds then I would not worry about it. However the site is loading 2 seconds or more I would look into what could be condensed, or removed for the page.
User 122279 Photo


Senior Advisor
14,450 posts

Adam, it is the html that does not validate, it complains about the tags (of the link to the css file) being out of place. If I put the css file where it should be, the html validates.
I have a client who is continuously asking me to make his pages load faster (measuered with the Google tool mentioned in my first post), without actually realizing that they have masses of contents with scripts called from outside for all sorts of 'social' things, and images and a zillion links.

Oh well, I'll let him have his way, I suppose...
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2484360 Photo


Registered User
3,293 posts

In the end you can only guide your client. If they want it, they will have it and if not from you, from someone else.

I would do as he asks and provide him with the information that really is slowing down his website. :P

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.