META“过期”标签 [英] META "expires" tag

查看:121
本文介绍了META“过期”标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



其中一个部分提到了使用META过期时间,因此在FF中使用pagespeed时,我能够找到一些关于如何减少页面加载时间的区域。 标签,它列出了我所有的CSS和JS文件,以及IMG文件。



现在,如果我只是将此标签合并到home index.asp页面我的网站,例如1年,是否适用于从主页加载的所有元素?



Google建议使用expires标记。这是标签的正确格式:

 < META HTTP-EQUIV =expiresCONTENT =Wed,01 Jan 2012 08:00:00 GMT> 


解决方案


Meta Expires标记定义正在编入索引的
文档的
过期日期和时间。它有
被认为Meta Expires标记是
有用的时期,当您的
业务运行有限的时间
事件/报价或者如果有预设的
日期,当您的网页文件不再有
时间可用于索引。一旦您的
达到了列出的日期,那么
搜索引擎就应该从
数据库中删除您的网页。




所以,它与缓存页面内容没有任何关系,它只是告诉搜索引擎嘿!停止索引这个页面的一种方式。



您需要在 .htaccess 中添加Future Expires标题,如下所示:

 < FilesMatch\。(jpg | jpeg | png | gif | js | css)$> 
标题设置过期周四,2010年4月15日20:00:00 GMT
< / FilesMatch>

http://www.askapache.com/htaccess/apache-speed-expires.html



在雅虎他们没有提到使用meta expires 标签的准则,他们提到使用 expires 标题,重新完成两件完全不同的事情。


So using pagespeed in FF, i was able to find some areas on how to decrease my page load time.

One of the sections mentiones using the META "expires" tag, and it lists all of my CSS and JS files, as well as IMG files.

Now, if i just incorporate this tag into the home index.asp page of my site, for say 1 year, does that apply to all of the elements loaded from the home page?

Google recommends using the "expires" tag. Is this the proper formatting for this tag:

<META HTTP-EQUIV="expires" CONTENT="Wed, 01 Jan 2012 08:00:00 GMT">

解决方案

The Meta Expires tag defines the expiration date and time of the web document that is being indexed. It has been said that the Meta Expires tag is helpful for those periods when your business is running a limited time event/offer or if there is a preset date when your web document will no longer be valid for indexing. Once you have reached the listed date, the search engines are then supposed to delete your web page from their database.

So, it doesn't have anything to do with caching the content of the page, it's just a way to tell the search engines "Hey! stop indexing this page"

What you need is to add Future Expires Headers in your .htaccess, like this:

<FilesMatch "\.(jpg|jpeg|png|gif|js|css)$">
    Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
</FilesMatch>

http://www.askapache.com/htaccess/apache-speed-expires.html

In the Yahoo! guidelines they don't mention the use of the meta expires tag, they do mention to use expires headers, they're two completely different things.

这篇关于META“过期”标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆