meta

在html页面上设置不缓存

自作多情 提交于 2019-12-07 19:46:12
<meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> 附:html页面中meta的作用   meta是用来在HTML文档中模拟HTTP协议的响应头报文。meta 标签用于网页的<head>与</head>中,meta 标签的用处很多。meta 的属性有两种:name和http-equiv。name属性主要用于描述网页,对应于content(网页内容),以便于搜索引擎机器人查找、分类(目前几乎所有的搜索引擎都使用网上机器人自动查找meta值来给网页分类)。这其中最重要的是description(站点在搜索引擎上的描述)和keywords(分类关键词),所以应该给每页加一个meta值。比较常用的有以下几个:    name 属性   1、<meta name="Generator" contect="">用以说明生成工具(如Microsoft FrontPage 4.0)等;   2、<meta name="KEYWords" contect="">向搜索引擎说明你的网页的关键词;   3、<meta name="DEscription" contect=""

How to properly configure phonegap for Android so it does not zoom on text input

人走茶凉 提交于 2019-12-07 19:37:35
问题 Good Morning All, I am building an Android app and for the life of me I cannot stop HTC and ZTE devices from zoooming in ridiculously close when you use a text field. I am trying to build this in a high resolution, and this is my meta viewport settings. <meta name="viewport" content="width=device-width,target-densitydpi=320, initial-scale=1.0 minimum-scale=1.0, maximum-scale=1.0"> This works great on almost every single device, but on a test ZTE warp using 2.3.5 , it zooms into input fields.

WordPress数据库结构

心不动则不痛 提交于 2019-12-07 18:58:44
WordPress仅仅用了10 个表:wp_comments, wp_links, wp_options, wp_postmeta, wp_posts, wp_term_relationships, wp_term_taxonomy, wp_terms, wp_usermeta, wp_users 按照功能大致分为 五类 用户信息: wp_users和wp_usermeta 链接信息: wp_links 文章及评论信息: wp_posts、wp_postmeta、wp_comments 对分类,链接分类,标签管理: wp_term,wp_term_relationships,wp_term_taxonomy 全局设置信息: wp_options wp_posts 博客发表”文章”存放的地方就是这个wp_posts表了。这个表里存放的除了普通的文章之外,还有附件和页面(page)的一些信息。post_type 字段是用来区分文章类型的。如果post_type是’post’,那么就是文章,如果是’page’,那么就是页面,如果是’attachment’, 那么就是附件了. wp_postmeta 这个表很简单,只有 meta_id, post_id, meta_key, meta_value 这四个字段。post_id 是相关 “文章” 的id。meta_value

Meta Viewport just on Portrait?

旧时模样 提交于 2019-12-07 17:05:47
问题 I'm doing a website for a client and I need to do something weird for the responsive version: if I open the website in portrait the page should look responsive (with the media queries I already did); but if I look the page in landscape mode it should look like the desktop version (without "meta viewport" tag); I tried adding a conditional in my css ("orientation:portrait") but the landscape version doesn't look good because I have pixel units and percentages units and all that, I just need

微信公众平台开发:进阶篇(Web App开发入门)

烈酒焚心 提交于 2019-12-07 09:18:01
WebApp与Native App有何区别呢? Native App: 1、开发成本非常大。一般使用的开发语言为JAVA、C++、Objective-C。 2、更新体验较差、同时也比较麻烦。每一次发布新的版本,都需要做版本打包,且需要用户手动更新(有些应用程序即使不需要用户手动更新,但是也需要有一个恶心的提示)。 3、非常酷。因为native app可以调用IOS中的UI控件以UI方法,它可以实现WebApp无法实现的一些非常酷的交互效果。 4、Native app是被Apple认可的。Native app可以被Apple认可为一款可信任的独立软件,可以放在Apple Stroe出售,但是Web app却不行。 Web App: 1、开发成本较低。使用web开发技术就可以轻松的完成web app的开发。 2、升级较简单。升级不需要通知用户,在服务端更新文件即可,用户完全没有感觉。 3、维护比较轻松。和一般的web一样,维护比较简单,它其实就是一个站点。 Webapp说白了就是一个针对Iphone、Android优化后的web站点,它使用的技术无非就是HTML或HTML5、CSS3、JavaScript,服务端技术JAVA、PHP、ASP。 当然,因为这些高端智能手机(Iphone、Android)的内置浏览器都是基于webkit内核的,所以在开发WEBAPP时,多数都是使 用

Why write to Stream in chunks?

房东的猫 提交于 2019-12-07 03:54:22
问题 I am wondering why so many examples read byte arrays into streams in chucks and not all at once... I know this is a soft question, but I am interested. I understand a bit about hardware and filling buffers can be very size dependent and you wouldn't want to write to the buffer again until it has been flushed to wherever it needs to go etc... but with the .Net platform (and other modern languages) I see examples of both. So when use which and when, or is the second an absolute no no? Here is

JQuery特殊属性操作、事件机制 (3)

会有一股神秘感。 提交于 2019-12-07 01:53:23
1. jQuery特殊属性操作 1.1. val方法 val方法用于设置和获取表单元素的值,例如input、textarea的值 //设置值 $("#name").val(“张三”); //获取值 $("#name").val(); 1.2. html方法与text方法 html方法相当于innerHTML text方法相当于innerText //设置内容 $(“div”).html(“<span>这是一段内容</span>”); //获取内容 $(“div”).html() //设置内容 $(“div”).text(“<span>这是一段内容</span>”); //获取内容 $(“div”).text() 区别:html方法会识别html标签,text方法会那内容直接当成字符串,并不会识别html标签。 1.3. width方法与height方法 设置或者获取高度 //带参数表示设置高度 $(“img”).height(200); //不带参数获取高度 $(“img”).height(); 获取网页的可视区宽高 //获取可视区宽度 $(window).width(); //获取可视区高度 $(window).height(); 1.4. scrollTop与scrollLeft 设置或者获取垂直滚动条的位置 //获取页面被卷曲的高度 $(window).scrollTop()

Django: model object “has no attribute '_meta'” in class based view

旧街凉风 提交于 2019-12-06 23:59:29
问题 Hi Stackoverflow people, I am working with class based views and for a test site, I followed the documentation to setup the class based views. For a project site (based on the project model below), I just want to create a quick CRUD application for the simple project model below. models.py class Project(models.Manager): name = models.CharField(_('Name of the Project'), max_length = 100,) slug = models.SlugField(max_length=100,) ... views.py from django.views.generic.edit import CreateView,

Django配置多数据库

一个人想着一个人 提交于 2019-12-06 22:56:27
1 、定义数据库 在Django项目中,一个工程中存在多个app应用很常见,希望不同的app连接不同的数据库,这个时候需要建立多个数据库连接。 在Django的setting中使用DATABASE设置定义数据库,可以将数据库映射到特定的别名字典中 DATABASE定义的是给嵌套字典,该设置必须设置default默认数据库。默认使用SQLite进行单已数据库设置 1)DATABASE内部选项 ATOMIC_REQUESTS:为True的数据库事务包装每个视图,默认为False AUTOCOMMIT:为False时禁用Django事务管理,默认为True ENGINE:设置数据库类型 'django.db.backends.postgresql' 'django.db.backends.mysql' 'django.db.backends.sqlite3' 'django.db.backends.oracle' HOST:指定连接的主机名或ip地址,如果使用(‘/’)正斜杠开头则通过套接字连接: 'HOST':'127.0.0.1' #TCP套接字连接 'HOST':'/var/run/mysql' #UNIX套接字 NAME:指定使用的数据库名,对于SQLite它是指定数据库文件的路径,在window上也要使永正斜杠 'NAME':'databasename' 'NAME':'C:

Javascript change meta values

这一生的挚爱 提交于 2019-12-06 20:38:49
I'm currently working with google plus button. The values return by google plus is based on what is included at the meta on my head tag And I have a list to be submitted using g+1 but it is under the tags that's why I can't update what is going to be posted on google plus these are my codes <meta itemprop="name" content="<?=$content?>"> <meta itemprop="description" content="<?=$description?>"> <meta itemprop="image" content="http://mysite/image.png"> below those lines are <div> content to submit by g+1 <div class='g-plusone' data-size='medium' data-annotation='none'></div> </div> <div> content