Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

META "expires" tag

Tags:

html

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">
like image 362
tony noriega Avatar asked Jan 19 '11 21:01

tony noriega


1 Answers

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.

like image 99
Ben Avatar answered Sep 28 '22 08:09

Ben