• meta标签部分总结


    <meta>标签用于提供页面的元信息,比如针对搜索引擎和更新频度的描述和关键词。
    由于看到很多网页<head>里面<meta>标签的内容很多,对这些标签含义了解不太清晰,因此进行归纳总结。(内容参考 http://www.haorooms.com/post/html_meta_ds)

    meta标签的作用有:搜索引擎优化(SEO),定义页面使用语言,自动刷新并指向新的页面,实现网页转换
    时的动态效果,控制页面缓冲,网页定级评价,控制网页显示的窗口等。

    1.name属性
    <meta name="参数" content="具体的参数值">(content里面的内容用逗号隔开)

    name属性主要参数:

    keywords(关键词)

    description(网站内容描述)

    robots
    (机器人向导,用来告诉搜索机器人哪些页面需要索引,哪些不需要索引;
    content参数有:all,none,index,noindex,follow,nofollow.默认是all)
    <meta name="robots" content="none">

    author(作者,标注网页上的作者)
    <meta name="author" content="root,root@xxx.com">

    generator(说明网站的采用的什么软件制作)
    <meta name="generator" content="信息参数"/>

    COPYRIGHT(说明网站版权信息)
    <meta name="COPYRIGHT" content="信息参数">

    revisit-after(代表网站重访,7days代表7天,以此类推)
    <meta name="revisit-after" content="7days">

    2.http-equiv属性
    相当于文件头作用,可以向浏览器传回一些有用的信息,以帮助正确和精确的显示网页内容,与之对应的属性值
    为content,content中的内容其实就是各个参数的变量值。

    <meta http-equiv="参数" content="参数变量值">

    Expires(期限,用于设定网站的到期时间,一旦网站到期,必须到服务器上重新传输。必须使用GMT时间格式)
    <meta http-equiv="expires" content="Fri,12Jan200218:18:18GMT">

    Pragma(cache模式,设置为no-cache,访问者将无法脱机浏览。)
    <meta http-equiv="pragma" content="no-cache">

    Refresh(刷新,自动刷新并指向新页面)
    <meta http-equiv="Refresh" content="2;URL=http://www.hao123.com">

    Set-Cookie(cookie设定,如果网页过期,那么存盘的cookie将被删除)
    <meta http-equiv="Set-Cookie" content="cookie value=xxx;expires=Fri,12Jan200218:18:18GMT;path=/">

    Window-target(显示窗口的设定,强制页面在当前窗口以独立页面显示,用于防止别人在框架里调用自己的页面)
    <meta http-equiv="Window-target" content="_top">

    content-Type(显示字符集的设定,设定页面使用的字符集)
    <meta http-equiv="content-Type" content="text/html;charset=gb2312">
    字符编码类型:
    gb2312, 简体中文;
    big5, 繁体中文;
    iso-2022-jp, 日文;
    ks_c_5601, 韩文;
    iso-8859-1, 英文;
    utf-8, 世界通用的语言编码;

    content-Language(显示语言的设定)
    <meta http-equiv="content-Language" content="zh-cn"/>

    Cache-Control(指定请求和响应遵循的缓存机制)
    <meta http-equiv="cache-control" content="no-transform">(禁止百度转码)
    在请求消息或响应消息中设置Cache-Control并不会修改另一个消息处理过程中的缓存处理过程。
    请求时的缓存指令包括no-cache、no-store、max-age、max-stale、min-fresh、only-if-cached,
    响应消息中的指令包括public、private、no-cache、no-store、no-transform、must-revalidate、proxy-revalidate、max-age。

    imagetoolbar(指定是否显示图片工具栏,false代表不显示,true代表显示)
    <meta http-equiv="imagetoolbar" content="false">

    Content-Script-Type(w3c网页规范,指明页面中脚本的类型)
    <meta http-equiv="Content-Script-Type" content="text/javascript">

    Page-Enter/Page-Exit(设定进入和离开页面时的特殊效果,tansition是滤镜效果,有24种)
    <meta http-equiv="Page-Enter" content="revealTrans(duration=10,transtion=5)"

    <meta http-equiv="Page-Exit" content="revealTrans(duration=20,transtion=6)"

  • 相关阅读:
    SQLite基本(实例FileOrganizer2013.5.12)
    MongoDB常见问题
    Node.js
    Linux安装indicator-china-weather
    Hadoop常见问题
    Hadoop HDFS文件操作
    Ubuntu下载、zsync、安装、常见问题
    Mongo-Hadoop
    Mongo JavaTest
    MongoDB 快速入门
  • 原文地址:https://www.cnblogs.com/lionisnotkitty/p/5943199.html
Copyright © 2020-2023  润新知