W3C验证 html meta Bad value Pragma for attribute http-equiv on element meta

本文介绍了一个关于HTML元标签的问题,并提供了正确的使用方式以确保网页能在不同浏览器中正确地被缓存或禁止缓存。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. Error Line 7, Column 45Bad value Pragma for attribute http-equiv on element meta.
    <meta http-equiv="Pragma" content="no-cache">

  2. Error Line 8, Column 52Bad value Cache-Control for attribute http-equiv on element meta.
    <meta http-equiv="Cache-Control" content="no-cache">

  3. Error Line 9, Column 39Bad value Expires for attribute http-equiv on element meta.
    <meta http-equiv="Expires" content="0">
    
    



 

在线验证地址:http://validator.w3.org/

 

验证网页:http://each.sinaapp.com/game/

 

原meta标签为:

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">

 

修改后标签为(兼容多浏览器含IE):

<meta http-equiv="cache-control"content="max-age=0"/>
<meta http-equiv="cache-control"content="no-cache"/>
<meta http-equiv="expires"content="0"/>
<meta http-equiv="expires"content="Tue, 01 Jan 1980 1:00:00 GMT"/>
<meta http-equiv="pragma"content="no-cache"/>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值