Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Should I be concerned about W3C error

Featured Replies

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.

Edited by Renaissance-Design
Please use the code button or tags to format your code.

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.com/tags/tag_meta.asp

 

And this one for http-equiv:

http://www.w3schools.com/tags/att_meta_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.

  • Author

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.

  • Author

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.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.