当输入网址打开网页时,设置html头部meta
的http-equiv
属性,可以帮助浏览器更加精确和正常却的显示网页内容,比如设置网页多久自动刷新,设置网页在浏览器缓存中的时限,设置多少事件跳转到指定的网页地址,应对低版本浏览器的渲染兼容问题,以什么样动态的样式去打开浏览器等等等…
首先,我们得知道一张网页即html文档最基础的代码形式和作用是怎样的
DOCTYPE html>
<html lang="en">
<head>
<title>Documenttitle>
<meta charset="UTF-8">
<meta name="" content="">
<meta http-equiv="Content-Type" Content="text/html;Charset=gb2312">
<script>script>
<style>style>
<link/>
head>
<body>
body>
html>
其次,在今天的学习中,我学到了11种关于http-equiv的属性即设置这些属性的意义,总结如下,与同行和大神们共勉和分享,如有错误的地方,多多指点,本人将不甚感激并及时修正。
http-equiv
属性<meta http-equiv="Content-Type" Content="text/html;Charset=gb2312">
<meta http-equiv="Content-Language" Content="zh-CN">
<meta http-equiv="Refresh" Content="60" >
<meta http-equiv="Refresh" Content="5" Url=http://www.baidu.com>
<meta http-equiv="Expires" Content="0">
<meta http-equiv="Expires" Content="Wed,26 Feb 1997 08:21:57 GMT">
<Prama cach模式 -->
<!--meta http-equiv="Pragma" Content="No-each">
<meta http-equiv="Set-Cookie" Content="cookievalue=xxx;expires=Wednesday">
<meta http-equiv="Window-target" Content="_top">
<meta http-equiv=”Pics-label” Contect=“>
<meta http-equiv=”MSThemeCompatible” Content=”Yes”>
<meta http-equiv=”IE6″ Content=”Generator”>
<meta http-equiv="Content-Script-Type" Content="text/javascript">
<meta http-equiv="X-UA-Compatible" content="IE=edge">