2012-10-02 3 views
13

Ich habe ein Problem, wenn ich den html5-Validator von w3c validator an meine Site übergebe. Die Fehler sind weiter:Schlechte Werte in Meta-Tags

Bad value Content-Script-Type for attribute http-equiv on element meta 
<meta http-equiv="Content-Script-Type" content="text/javascript" > 

Bad value expires for attribute http-equiv on element meta 
<meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT" > 

Bad value pragma for attribute http-equiv on element meta 
<meta http-equiv="pragma" content="no-cache" > 

Bad value Cache-Control for attribute http-equiv on element meta. 
<meta http-equiv="Cache-Control" content="no-cache" > 

Was sind die richtigen Werte zu Meta-Tags html5-Validator übergeben?

+1

möglich Duplikat [HTML5 Meta-Validierung] (http://stackoverflow.com/questions/9655526/html5-meta-validation) – Barett

Antwort

8

Für HTML5 verwenden Sie eine Cache-Manifest-Datei in der Kopfzeile. Dies ist ein Beispiel dafür, wie man verwendet: http://www.w3.org/TR/html5/browsers.html#manifests

Auch zwingen Sie keinen Cache mit diesem:

<meta http-equiv="expires" content="0"> 

Dies ist eine gute Anleitung, wie die Cache-Manifest-Datei verwenden: http://www.html5rocks.com/en/tutorials/appcache/beginner/

+1

Vielen Dank für Ihre Hilfe. Aber ich habe immer noch das gleiche Problem mit dem nächsten Meta-Tag: '' mit der Nachricht Fehler: ** Bad Wert Content-Script- Typ für Attribut http-Äquiv. Auf Element Meta ** Kennen Sie irgendeine Lösung? Vielen Dank im Voraus –

+1

@ JoséCarlos - Für Javascript in der Kopfzeile können Sie einfach ''. Weitere Informationen finden Sie unter folgendem Link: http://stackoverflow.com/questions/6320084/why-is-meta-http-equiv-content-script-type-mostly-unused – ews2001

+5

verfällt meta ist in html5 nicht erlaubt – Barett

5

Die angenommene Antwort ist falsch! This ist eine gute Antwort.

Um Alohci zu zitieren:

Putting caching instructions into meta tags is not a good idea, because although browsers may read them, proxies won't. For that reason, they are invalid and you should send caching instructions as real HTTP headers.