移动端meta标签缓存设置

1.<meta charset="utf-8">  

 

2.<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">   

3.<meta content="telephone=no"  name="format-detection">

4.<meta  content="我的页面" name="keywords">

5.<meta content=""  name="description">

6.<meta content="yes" name="apple-mobile-web-app-capable">

7.<meta content="black" name="apple-mobile-web-app-status-bar-style">

8.<meta http-equiv="pragma" content="no-cache">

9.<meta http-equiv="cache-control" content="no-cache">

 

1.设置网页字符编码utf-8

2.设置视口宽度为设备宽度,禁止用户缩放 

3.设置禁止自动将数字识别为电话号码

4.设置网页关键字,利于seo搜索

5.设置网页主要内容描述,利于seo搜索

6.删除默认的苹果工具栏和菜单栏

7.设置状态栏显示样式(默认样)

8.定义页面是否缓存(pragma配合no-cache禁止页面被缓存)//http1.0

9.设置页面缓存方式(cache-control的contend的取值有no-cache、no-store、max-age、must-revalidate)//http1.1

注:no-cache:不缓存过期的资源,缓存会向服务器进行有效处理确认之后处理资源。

  no-store: 不进行任何缓存

  max-age: 指定过期时间,有效期内从缓存获取

  must-revalidate:作用同no-cache,强制校验本地版本是否过期

使用no-cache的目的就是为了防止从缓存中获取过期的资源。

 

posted @ 2017-12-07 18:10  尹言覃少  阅读(949)  评论(0编辑  收藏  举报