W3C Invalid: On-Page SEO

13 replies
  • SEO
  • |
Hi Warriors

My site is loading slow and is W3C invalid. Do any of you know how to fix any of these problems? Or where I could go to find someone who knows how to fix them? Here are the problems it identified...
  • Make fewer HTTP requests
  • Use a Content Delivery Network (CDN)
  • Add Expires Headers
  • Compress components with gzip
  • put JavaScript at Bottom (I use rotating pics at the top, so this one's probably a non-issue)
  • Use cookie-free domains

The problem is that I don't know what half this stuff means and don't know where to start finding solutions.:confused:

The site is a Wordpress at ComediansResource.com.
#invalid #onpage #seo #w3c
  • Profile picture of the author upnorth
    When we started building websites a few years ago we were obsessed with W3C Validation. But it was a pain for the coders.

    Now I do have a different opinion and I don't think it's that important. We have sites that are not W3C compliant and are performing extremely well in the S.E.

    But, not W3C does not mean that it should be full of errors and slow etc...far from it.

    I quickly visited your site and yes it's very slow, (I am sure many would leave , high bounce rate ).

    If you are not technical, the best best would be to hire someone on Elance, RAC, or some other freelancers sites and post a specific project to fix this. Should be an easy job for a good coder.

    Dan
    {{ DiscussionBoard.errors[3950217].message }}
  • Profile picture of the author WillR
    Originally Posted by upnorth View Post

    When we started building websites a few years ago we were obsessed with W3C Validation. But it was a pain for the coders.

    Now I do have a different opinion and I don't think it's that important. We have sites that are not W3C compliant and are performing extremely well in the S.E.

    But, not W3C does not mean that it should be full of errors and slow etc...far from it.

    I quickly visited your site and yes it's very slow, (I am sure many would leave , high bounce rate ).

    If you are not technical, the best best would be to hire someone on Elance, RAC, or some other freelancers sites and post a specific project to fix this. Should be an easy job for a good coder.

    Dan
    W3C Validation is important to look at because it can point out a lot of things that are wrong with a page that will negatively impact the visitors user experience when viewing that page. That's what is important. Yes, you don't need to have a fully compliant page, take a look at Google and lots of the other big websites, they sure aren't. But you should still take note of the errors and try and fix as many as possible so your site will work on as many browsers as possible.
    {{ DiscussionBoard.errors[3950477].message }}
  • This is going to be a long post, but you asked for it:

    #1 - Every time you use a full http link, the server basically treats it like it is going to another website, which slows down your load time. Instead of linking to a page within your site like this:
    Code:
    <a href="http://comediansresource.com/signup>
    Use this, instead:

    Code:
    <a href="/signup/">
    This tells it that the page is within the current directory, and therefore it doesn't have to start from square one to find it. It will go pretty much straight to that sub-folder.

    And just FYI: Always add a trailing slash to subfolder references. If you link like this:

    Code:
    <a href=http://comediansresource.com/signup"">
    you will generate two requests to the server. The server will first add a slash to the address, and then create a new request like this:

    Code:
    <a href="http://comediansresource.com/signup/">
    Again, every few seconds counts in page load time.

    #2 - Unless you have a series of your own servers, there's not a whole lot you can do about this, and I doubt that's really much of a problem, anyway, with a site that small.

    #3 - Adding 'expires header' doesn't affect the page load time for a first time visitor, but you will be surprised how much the page load time decreases (meaning a faster page load) for subsequent page views/return visits from that visitor. 'Expires header' specifies a time in the future so that browsers won’t try to re-fetch images, CSS, javascript files, etc., on each visit if they haven’t changed (this also reduces the number of HTTP requests), hence the performance improvement on subsequent page views.

    If your server is Apache (which is the majority of web servers), you can use the ‘ExpiresDefault’ directive to set an expiration date relative to the current date.

    Code:
    ExpiresDefault “access plus 2 months”
    This sets the expiry date of the file 2 months into the future from the current time. The following values can be used to specify the time period:
    • years
    • months
    • weeks
    • days
    • hours
    • minutes
    • seconds
    eg. ExpiresDefault “access plus 14 days”

    To add expires header to the image, CSS, javascript files add the following to your .htaccess file:

    Code:
    #Expire Header
     <FilesMatch ".(ico|jpg|jpeg|png|gif|js|css|swf)$">
     ExpiresDefault "access plus 2 hours"
     </FilesMatch>
    or

    Code:
    # Expire images header
     ExpiresActive On
     ExpiresDefault A0
     ExpiresByType image/gif A2592000
     ExpiresByType image/png A2592000
     ExpiresByType image/jpg A2592000
     ExpiresByType image/jpeg A2592000
     ExpiresByType image/ico A2592000
     ExpiresByType text/css A2592000
     ExpiresByType text/javascript A2592000
    A2592000 means 1 month in the future (60*60*24*30=2592000)

    Keep in mind that when you use 'expires header' the files are cached in the browser until it expires, so do not use this on files that change frequently. If you change/update a file that has a far future expiry (eg. CSS or javascript files) then you should rename that file and use the renamed version so the browser doesn’t fetch the old file each time.

    #4 - Again, you must be using an Apache server for this to work, but
    to set up gzip compression, paste the following into your .htaccess file:

    Code:
    <IfModule mod_gzip.c>
    mod_gzip_on Yes
    mod_gzip_dechunk Yes
    mod_gzip_keep_workfiles No
    mod_gzip_can_negotiate Yes
    mod_gzip_add_header_count Yes
    mod_gzip_send_vary Yes
    mod_gzip_command_version '/mod_gzip_status'
    mod_gzip_min_http 1000
    mod_gzip_minimum_file_size 300
    mod_gzip_maximum_file_size 512000
    mod_gzip_maximum_inmem_size 60000
    mod_gzip_handle_methods GET POST
    mod_gzip_temp_dir /tmp
    mod_gzip_item_include file .html$
    mod_gzip_item_include file .php$
    mod_gzip_item_include file .pl$
    mod_gzip_item_include file .rb$
    mod_gzip_item_include file .py$
    mod_gzip_item_include file .cgi$
    mod_gzip_item_include file .css$
    mod_gzip_item_include file .js$
    mod_gzip_item_include mime ^application/javascript$
    mod_gzip_item_include mime ^application/x-javascript$
    mod_gzip_item_include mime ^text/.*
    mod_gzip_item_include mime ^httpd/unix-directory$
    mod_gzip_item_include handler ^cgi-script$
    mod_gzip_item_include handler ^server-status$
    mod_gzip_item_include handler ^server-info$
    mod_gzip_item_include handler ^application/x-httpd-php
    mod_gzip_item_exclude mime ^image/.*
    </IfModule>
    If all goes well, 'Compress components with gzip' should no longer be an issue. If you still get it, then it's likely due to the fact that you are calling in external files like JavaScripts, style sheets or images. If that’s the case, you're out of luck unless you have some control or influence over the external file(s).


    #5 - Yup, put your Javascript at the bottom of the page. That way it's the last thing loaded, and the rest of the page will load faster for your visitors.


    #6 - If that's an option, you could always NOT set a cookie, but for the most part that probably wouldn't be good thing. Cookies are generally helpful, unless you're just setting way too many of them. If you are using ads outside of your server (such as Adsense), they could also be setting cookies, as well.



    Once last thing I noticed: That HUGE image on the home page may be a problem, too. If you haven't already, try slicing it up into sections.

    [EDIT] That's a lot of typing and code in here, so if anyone comes across any mistakes, please let me know so I can update this.
    {{ DiscussionBoard.errors[3950694].message }}
    • Profile picture of the author whoserman
      Originally Posted by Bradley J Anderson View Post

      This is going to be a long post, but you asked for it:

      #1 - Every time you use a full http link, the server basically treats it like it is going to another website, which slows down your load time. Instead of linking to a page within your site like this:
      Code:
      <a href="http://comediansresource.com/signup>
      Use this, instead:

      Code:
      <a href="/signup/">
      This tells it that the page is within the current directory, and therefore it doesn't have to start from square one to find it. It will go pretty much straight to that sub-folder.

      And just FYI: Always add a trailing slash to subfolder references. If you link like this:

      Code:
      <a href=http://comediansresource.com/signup"">
      you will generate two requests to the server. The server will first add a slash to the address, and then create a new request like this:

      Code:
      <a href="http://comediansresource.com/signup/">
      Again, every few seconds counts in page load time.

      #2 - Unless you have a series of your own servers, there's not a whole lot you can do about this, and I doubt that's really much of a problem, anyway, with a site that small.

      #3 - Adding 'expires headers' doesn't affect the page load time for a first time visitor, but you will be surprised how much the page load time decreases (meaning a faster page load) for subsequent page views/return visits from that visitor. 'Expires headers' specifies a time in the future so that browsers won’t try to re-fetch images, CSS, javascript files, etc., on each visit if they haven’t changed (this also reduces the number of HTTP requests), hence the performance improvement on subsequent page views.

      If your server is Apache (which is the majority of web servers), you can use the ‘ExpiresDefault’ directive to set an expiration date relative to the current date.

      Code:
      ExpiresDefault “access plus 2 months”
      This sets the expiry date of the file 2 months into the future from the current time. The following values can be used to specify the time period:
      • years
      • months
      • weeks
      • days
      • hours
      • minutes
      • seconds
      eg. ExpiresDefault “access plus 14 days”

      To add expires header to the image, CSS, javascript files add the following to your .htaccess file:

      Code:
      #Expire Header
       <FilesMatch ".(ico|jpg|jpeg|png|gif|js|css|swf)$">
       ExpiresDefault "access plus 2 hours"
       </FilesMatch>
      or

      Code:
      # Expire images header
       ExpiresActive On
       ExpiresDefault A0
       ExpiresByType image/gif A2592000
       ExpiresByType image/png A2592000
       ExpiresByType image/jpg A2592000
       ExpiresByType image/jpeg A2592000
       ExpiresByType image/ico A2592000
       ExpiresByType text/css A2592000
       ExpiresByType text/javascript A2592000
      A2592000 means 1 month in the future (60*60*24*30=2592000)

      Keep in mind that when you use 'expires header' the files are cached in the browser until it expires, so do not use this on files that change frequently. If you change/update a file that has a far future expiry (eg. CSS or javascript files) then you should rename that file and use the renamed version so the browser doesn’t fetch the old file each time.

      #4 - Again, you must be using an Apache server for this to work, but
      to set up gzip compression, paste the following into your .htaccess file:

      Code:
      <IfModule mod_gzip.c>
      mod_gzip_on Yes
      mod_gzip_dechunk Yes
      mod_gzip_keep_workfiles No
      mod_gzip_can_negotiate Yes
      mod_gzip_add_header_count Yes
      mod_gzip_send_vary Yes
      mod_gzip_command_version '/mod_gzip_status'
      mod_gzip_min_http 1000
      mod_gzip_minimum_file_size 300
      mod_gzip_maximum_file_size 512000
      mod_gzip_maximum_inmem_size 60000
      mod_gzip_handle_methods GET POST
      mod_gzip_temp_dir /tmp
      mod_gzip_item_include file .html$
      mod_gzip_item_include file .php$
      mod_gzip_item_include file .pl$
      mod_gzip_item_include file .rb$
      mod_gzip_item_include file .py$
      mod_gzip_item_include file .cgi$
      mod_gzip_item_include file .css$
      mod_gzip_item_include file .js$
      mod_gzip_item_include mime ^application/javascript$
      mod_gzip_item_include mime ^application/x-javascript$
      mod_gzip_item_include mime ^text/.*
      mod_gzip_item_include mime ^httpd/unix-directory$
      mod_gzip_item_include handler ^cgi-script$
      mod_gzip_item_include handler ^server-status$
      mod_gzip_item_include handler ^server-info$
      mod_gzip_item_include handler ^application/x-httpd-php
      mod_gzip_item_exclude mime ^image/.*
      </IfModule>
      If all goes well, 'Compress components with gzip' should no longer be an issue. If you still get it, then it's likely due to the fact that you are calling in external files like JavaScripts, style sheets or images. If that’s the case, you're out of luck unless you have some control or influence over the external file(s).


      #5 - Yup, put your Javascript at the bottom of the page. That way it's the last thing loaded, and the rest of the page will load faster for your visitors.


      #6 - If that's an option, you could always NOT set a cookie, but for the most part that probably wouldn't be good thing. Cookies are generally helpful, unless you're just setting way too many of them. If you are using ads outside of your server (such as Adsense), they could also be setting cookies, as well.



      Once last thing I noticed: That HUGE image on the home page may be a problem, too. If you haven't already, try slicing it up into sections.

      [EDIT] That's a lot of typing and code in here, so if anyone comes across any mistakes, please let me know so I can update this.
      Thanks for the great reply.

      What do you mean by "Slicing a picture into sections?" I'm using a template for this, so I'm unsure if I could even change it if I tried.
      {{ DiscussionBoard.errors[3952156].message }}
      • Originally Posted by whoserman View Post

        Thanks for the great reply.

        What do you mean by "Slicing a picture into sections?" I'm using a template for this, so I'm unsure if I could even change it if I tried.
        Mine is built into my HTML editor, but the easiest way for most people is using a software designed for it such as this:

        Image Cut - Slice image for HTML, automate image slicing process

        Basically, it cuts your big image into smaller sections, so each section can be loading at the same time, rather than loading that one big image from top to bottom. Generally, it saves a lot of time with an image that big.

        Also (although this wouldn't be very useful with the image you have on there now), if you slice the image you can also hotlink each section individually so that, depending on where on the image the visitor clicks, it sends them to a different page. This isn't a great example, but you can see how it would be helpful to do something like that with an image such as this one:



        Click on the first blue image and it takes you to blue.html Click on the green image and it takes you to green.html etc.
        {{ DiscussionBoard.errors[3952701].message }}
    • Profile picture of the author tomfinster
      Hey Bradley J Anderson,

      Great information! Highly Valuable info! I have a few questions if you can answer for me please?

      Originally Posted by Bradley J Anderson View Post

      This is going to be a long post, but you asked for it:

      #1 - Every time you use a full http link, the server basically treats it like it is going to another website, which slows down your load time. Instead of linking to a page within your site like this:
      Code:
      <a href="http://comediansresource.com/signup>
      Use this, instead:

      Code:
      <a href="/signup/">
      ----->
      Question:

      Lets say that I'm using a link that is actually an affiliate link that's contained within a file on my page that I am redirecting from....

      ...For example: I use EasyRedirectScript(jason Fladlien) -- and I put all my affiliate links within my folder called recommend -- which creates a 302 redirect with the affiliate link which is now cloaked on my site... so it now looks like this ==> http://mywebsite[dot]com/recommend/ -- So do you think this will help me to use this method using <a href="/recommend/"> -- even on my affiliate redirects?

      Originally Posted by Bradley J Anderson View Post


      Code:
      # Expire images header
       ExpiresActive On
       ExpiresDefault A0
       ExpiresByType image/gif A2592000
       ExpiresByType image/png A2592000
       ExpiresByType image/jpg A2592000
       ExpiresByType image/jpeg A2592000
       ExpiresByType image/ico A2592000
       ExpiresByType text/css A2592000
       ExpiresByType text/javascript A2592000
      A2592000 means 1 month in the future (60*60*24*30=2592000)
      ----->
      Question:

      If I decide to utilize the above code, and want to use 3 hours instead of 1 Month, then what would the code be? And would I have to change anything in the gzip code if I change the time duration?

      Originally Posted by Bradley J Anderson View Post


      #6 - If that's an option, you could always NOT set a cookie, but for the most part that probably wouldn't be good thing. Cookies are generally helpful, unless you're just setting way too many of them. If you are using ads outside of your server (such as Adsense), they could also be setting cookies, as well.
      ----->
      Question:

      Can you expand on this statement above about adsense setting cookies. I guess I want to make sure that using the expires code & gzip code wont negatively effect me in any way for my affiliate redirect links, or having adsense code on my site sidebar.

      ----->
      Last Question:

      I noticed that the gzip compression code includes the following --> mod_gzip_item_include file .html$

      ...however, I don't see anything in the gzip compression code stating anything about .htm -- and I set my permalinks Custom Structure in wordpress as /%postname%.htm

      I don't know if this has anything to do with it? Or if I need to change anything? Please explain!

      In Many Thanks,
      Tom F.
      {{ DiscussionBoard.errors[7543163].message }}
    • Profile picture of the author shg
      Originally Posted by Bradley J Anderson View Post

      This is going to be a long post, but you asked for it:

      #1 - Every time you use a full http link, the server basically treats it like it is going to another website, which slows down your load time. Instead of linking to a page within your site like this:
      Code:
      <a href="http://comediansresource.com/signup>
      Use this, instead:

      Code:
      <a href="/signup/">
      This tells it that the page is within the current directory, and therefore it doesn't have to start from square one to find it. It will go pretty much straight to that sub-folder.

      And just FYI: Always add a trailing slash to subfolder references. If you link like this:

      Code:
      <a href=http://comediansresource.com/signup"">
      you will generate two requests to the server. The server will first add a slash to the address, and then create a new request like this:

      Code:
      <a href="http://comediansresource.com/signup/">
      Again, every few seconds counts in page load time.

      #2 - Unless you have a series of your own servers, there's not a whole lot you can do about this, and I doubt that's really much of a problem, anyway, with a site that small.

      #3 - Adding 'expires header' doesn't affect the page load time for a first time visitor, but you will be surprised how much the page load time decreases (meaning a faster page load) for subsequent page views/return visits from that visitor. 'Expires header' specifies a time in the future so that browsers won't try to re-fetch images, CSS, javascript files, etc., on each visit if they haven't changed (this also reduces the number of HTTP requests), hence the performance improvement on subsequent page views.

      If your server is Apache (which is the majority of web servers), you can use the 'ExpiresDefault' directive to set an expiration date relative to the current date.

      Code:
      ExpiresDefault "access plus 2 months"
      This sets the expiry date of the file 2 months into the future from the current time. The following values can be used to specify the time period:
      • years
      • months
      • weeks
      • days
      • hours
      • minutes
      • seconds
      eg. ExpiresDefault "access plus 14 days"

      To add expires header to the image, CSS, javascript files add the following to your .htaccess file:

      Code:
      #Expire Header
       <FilesMatch ".(ico|jpg|jpeg|png|gif|js|css|swf)$">
       ExpiresDefault "access plus 2 hours"
       </FilesMatch>
      or

      Code:
      # Expire images header
       ExpiresActive On
       ExpiresDefault A0
       ExpiresByType image/gif A2592000
       ExpiresByType image/png A2592000
       ExpiresByType image/jpg A2592000
       ExpiresByType image/jpeg A2592000
       ExpiresByType image/ico A2592000
       ExpiresByType text/css A2592000
       ExpiresByType text/javascript A2592000
      A2592000 means 1 month in the future (60*60*24*30=2592000)

      Keep in mind that when you use 'expires header' the files are cached in the browser until it expires, so do not use this on files that change frequently. If you change/update a file that has a far future expiry (eg. CSS or javascript files) then you should rename that file and use the renamed version so the browser doesn't fetch the old file each time.

      #4 - Again, you must be using an Apache server for this to work, but
      to set up gzip compression, paste the following into your .htaccess file:

      Code:
      <IfModule mod_gzip.c>
      mod_gzip_on Yes
      mod_gzip_dechunk Yes
      mod_gzip_keep_workfiles No
      mod_gzip_can_negotiate Yes
      mod_gzip_add_header_count Yes
      mod_gzip_send_vary Yes
      mod_gzip_command_version '/mod_gzip_status'
      mod_gzip_min_http 1000
      mod_gzip_minimum_file_size 300
      mod_gzip_maximum_file_size 512000
      mod_gzip_maximum_inmem_size 60000
      mod_gzip_handle_methods GET POST
      mod_gzip_temp_dir /tmp
      mod_gzip_item_include file .html$
      mod_gzip_item_include file .php$
      mod_gzip_item_include file .pl$
      mod_gzip_item_include file .rb$
      mod_gzip_item_include file .py$
      mod_gzip_item_include file .cgi$
      mod_gzip_item_include file .css$
      mod_gzip_item_include file .js$
      mod_gzip_item_include mime ^application/javascript$
      mod_gzip_item_include mime ^application/x-javascript$
      mod_gzip_item_include mime ^text/.*
      mod_gzip_item_include mime ^httpd/unix-directory$
      mod_gzip_item_include handler ^cgi-script$
      mod_gzip_item_include handler ^server-status$
      mod_gzip_item_include handler ^server-info$
      mod_gzip_item_include handler ^application/x-httpd-php
      mod_gzip_item_exclude mime ^image/.*
      </IfModule>
      If all goes well, 'Compress components with gzip' should no longer be an issue. If you still get it, then it's likely due to the fact that you are calling in external files like JavaScripts, style sheets or images. If that's the case, you're out of luck unless you have some control or influence over the external file(s).


      #5 - Yup, put your Javascript at the bottom of the page. That way it's the last thing loaded, and the rest of the page will load faster for your visitors.


      #6 - If that's an option, you could always NOT set a cookie, but for the most part that probably wouldn't be good thing. Cookies are generally helpful, unless you're just setting way too many of them. If you are using ads outside of your server (such as Adsense), they could also be setting cookies, as well.



      Once last thing I noticed: That HUGE image on the home page may be a problem, too. If you haven't already, try slicing it up into sections.

      [EDIT] That's a lot of typing and code in here, so if anyone comes across any mistakes, please let me know so I can update this.
      wow, this is something real help for the webmasters who really need help for their site. Thanks mate...
      {{ DiscussionBoard.errors[7543520].message }}
  • Profile picture of the author simonbuzz
    Banned
    all the big sites also have this kind of error...so don't worry about it
    {{ DiscussionBoard.errors[3950710].message }}
  • Profile picture of the author UMS
    You should install a caching plugin like W3 Total Cache, WP Super Cache or Quickcache.

    Also, you could look at using CloudFlare.
    {{ DiscussionBoard.errors[7543239].message }}
    • Profile picture of the author tomfinster
      Originally Posted by UMS View Post

      You should install a caching plugin like W3 Total Cache, WP Super Cache or Quickcache.

      Also, you could look at using CloudFlare.
      Okay, I already know about all of these caching plugins... But how does this answer any of the questions that I've asked. Are you saying that if I added the WP Super Cache plugin... then this plugin would take care of ANY & ALL of the questions that I've asked above?

      In Many Thanks,
      Tom F.
      {{ DiscussionBoard.errors[7543311].message }}

Trending Topics