Web Design Forum: Should I be concerned about W3C error - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Should I be concerned about W3C error content cache

#1 User is offline   MWP 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 43
  • Joined: 14-July 11
  • Reputation: 0
  • Gender:Male
  • Location:UK
  • Experience:Beginner
  • Area of Expertise:I'm Learning

Posted 02 February 2012 - 01:42 PM

Guy's I'm using the W3C markup validator and it's telling me this.

Line 21, Column 49: Bad value cache for attribute content on element meta: The legacy encoding declaration did not start with text/html;.

	<meta http-equiv="Content-Type" content="cache">


Syntax of legacy character encoding declaration:

The string text/html;, optionally followed by whitespace, followed by charset=, followed by an encoding name labeled as a "preferred MIME name" in the IANA Character Sets registry. Example: text/html; charset=utf-8

This is my code;

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="cache">


Now I'm trying to self teach the whole webdesign thing so am not entirely sure what to do to correct it if needed. I'm struggling to find anything on the net that explains the content="cache" in lamens terms. Two questions, anyone know of anywhere where I can learn the specifics of the above meta's and a should I be worried about it not validating??

Many thanks.

This post has been edited by Renaissance-Design: 02 February 2012 - 01:55 PM
Reason for edit: Please use the code button or tags to format your code.

0

#2 User is offline   FizixRichard 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 325
  • Joined: 05-October 07
  • Reputation: 47
  • Gender:Male
  • Location:Market Deeping, England
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 03 February 2012 - 11:45 AM

1. Your not setting the attributes correctly
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />


content-type is for your content type, i.e. text/html and character set


Here are some no-cache/cache control directives:
<meta http-equiv="cache-control" content="no-cache" />



Values you can put into content are:
public - cached in public cache
private - cached in private cache
no-cache - not cached
no-store - cached but not archived



Check this link:
http://www.w3schools...gs/tag_meta.asp

And this one for http-equiv:
http://www.w3schools..._http_equiv.asp


As for W3C Validation...

The whole point of the W3C is to define a global standard for how HTML and CSS should be defined which designers, developers and browsers will stick to.

The idea being, that if everyone (including browser vendors) all follow the same standard, your site should work, function and look the same on all devices.

Because browsers like to do their own thing a bit, it's not perfect, but overall it works.


The importance of correct validation is that if your pages validate, it means you have followed the specification to the letter and your site will in theory work and look the same across browsers.

However a failure in validation does not mean your site will not look and work the same in all browsers.

So as a rule of thumb it should validate and the only times it should not validate is when you have knowingly done something that you know won't validate (although I can't think of any scenarios for that off hand).

The reason for your validation failure was because you were outright defining your meta data incorrectly.
1

#3 User is offline   MWP 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 43
  • Joined: 14-July 11
  • Reputation: 0
  • Gender:Male
  • Location:UK
  • Experience:Beginner
  • Area of Expertise:I'm Learning

Posted 03 February 2012 - 12:54 PM

Thank you. Very much appreciated.

I had a feeling it might have been the meta definition that was wrong but couldn't find anywhere that confirmed it for me. Oddly enough I've also looked at lots of website's source code for hints and many have the same error.

Again thanks for the reply.
0

#4 User is offline   MWP 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 43
  • Joined: 14-July 11
  • Reputation: 0
  • Gender:Male
  • Location:UK
  • Experience:Beginner
  • Area of Expertise:I'm Learning

Posted 03 February 2012 - 12:56 PM

View PostMWP, on 02 February 2012 - 01:42 PM, said:

Guy's I'm using the W3C markup validator and it's telling me this.

Line 21, Column 49: Bad value cache for attribute content on element meta: The legacy encoding declaration did not start with text/html;.

	<meta http-equiv="Content-Type" content="cache">


Syntax of legacy character encoding declaration:

The string text/html;, optionally followed by whitespace, followed by charset=, followed by an encoding name labeled as a "preferred MIME name" in the IANA Character Sets registry. Example: text/html; charset=utf-8

This is my code;

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Type" content="cache">


Now I'm trying to self teach the whole webdesign thing so am not entirely sure what to do to correct it if needed. I'm struggling to find anything on the net that explains the content="cache" in lamens terms. Two questions, anyone know of anywhere where I can learn the specifics of the above meta's and a should I be worried about it not validating??

Many thanks.


Renaissance-Design: Thanks for editing my error in the post.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users