---
title: "网页head区常用代码"
author: "johnnyhg"
date: "2008-08-26T04:25:23Z"
tags: ["CMS", "CSS", "HTML", "框架", "浏览器"]
slug: "head"
draft: false
lastmod: "2008-08-26T04:25:23Z"
id: 232633
url: "https://johnnyhg.iteye.com/blog/232633"
---

**公司版权注释**  
&lt;!--- the site is designed by [jackiezy](http://zhaoyi.iteye.com/blog/zhaoyi.iteye.com "jackiezy") 08/2008 ---&gt;  

**网页显示字符集**  
简体中文：  
&lt;meta http-equiv="content-type" content="text/html; charset=gb2312" /&gt;  
繁体中文：  
&lt;meta http-equiv="content-type" content="text/html; charset=big5" /&gt;  
英 语：  
&lt;meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /&gt;  
或者：  
&lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt;

**原始制作者信息**  
&lt;meta name="author" content="[myblog.com](http://zhaoyi.iteye.com/blog/zhaoyi.iteye.com "个人博客") " /&gt; 

**网站简介，** 亦可用CMS标签动态描述  
&lt;meta name="description" content="这里填您网站的简介" /&gt; 

**搜索关键字**  
&lt;meta name="keywords" content="关键字1,关键字2,关键字3,..." /&gt;  

**网页的css规范**  
&lt;link href="style/style.css" rel="stylesheet" type="text/css" /&gt; 

**网页标题**  
&lt;title&gt;My Blog&lt;/title&gt; 

**二、head区可选加入的标识有：** 

**设定网页的到期时间** 。一旦网页过期，必须到服务器上重新调阅。  
&lt;meta http-equiv="expires" content="21 Aug 2008 08:21:57 gmt+8" /&gt; 

**禁止浏览器从本地机的缓存中调阅页面内容** 。  
&lt;meta http-equiv="pragma" content="no-cache" /&gt;  

**用来防止别人在框架里调用你的页面** 。  
&lt;meta http-equiv="window-target" content="\_top" /&gt; 

**自动跳转（5指时间停留5秒）** 。  
&lt;meta http-equiv="refresh" content="5;url=www.\*\*\*.com" /&gt;

**网页搜索机器人向导.用来告诉搜索机器人哪些页面需要索引，哪些页面不需要索引** 。  
&lt;meta name="robots" content="none" /&gt;  
content的参数有all,none,index,noindex,follow,nofollow。默认是all。 

**收藏夹图标**  
&lt;link rel = "shortcut icon" href="favicon.ico" /&gt;