Learn How to Use META Tags on Your Website

by Learnthat.com Staff on Sunday, November 21, 2004

If your website is continually changing and you need the freshest most updated version to appear in your user's browser, you can use META tags to disable caching of your page. This is used often by news and other websites to keep the page reloading each time you open their page.

There are several ways to have the browser reload the page each time the user requests it. The first way is to set the page to expired. An example of this is:

<META HTTP-EQUIV="expires" CONTENT="Wed, 03 Nov 1999 12:21:14 GMT">

You can also set a future expiration date, after that time, the page will be reloaded by the web browser each time it is requested.

Another useful attribute to prevent caching in Netscape is by using "pragma":

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

Microsoft Internet Explorer often ignores META tags, versions from 4.01 and down will still cache the page occasionally, but Netscape Navigator will honor the Pragma attribute.

Another useful - and sometimes dangerous - attribute is the Refresh attribute. This tag can refresh the present page, or can refresh to a different page measured in seconds. Two examples are:

<META HTTP-EQUIV="Refresh" CONTENT="1200">

<META HTTP-EQUIV="Refresh" CONTENT="10;URL=http://www.newsite.com">

The first example refreshes the current page in 1200 seconds, or 20 minutes. The second example refreshes the page in 10 seconds, but refreshes it by loading the second URL. This can be useful if you change your site from http://www.hostingprovider.com/~myname/reallygood/index.html to http://www.mywebsite.com. You can set the original page to display a message showing your move, then 10 seconds later refresh to the new page.

Be cautious when using these two examples. Some advertising sponsors won't allow you to use a Refresh attribute since it artificially inflates your page views. Also, some search engines won't index a page with a short refresh page that directs to a different page.

 

Page 3 of 5
That Network: Interactive Internet Publishing Network DefineThat.com: free technical definitions define wordsExamPractice.com: free certification news and practice exams   Explorestartups.com: find free business plans and business ideas   GiveThat.com: free gift ideas, birthday, Christmas, holidays  helpthat: got questions, we got answers   Jerm.com: entrepreneurship blog   learnthat.com: free software tutorials  mytutorials.com: collaborative write your own tutorials  Publishondemand.net: free publish on demand print on demand pod comparison   Romancetips.com: free romantic tips, advice, dating, date ideas, free romance   seekthat: free technical search engine   selfpublishthat: publish on demand   thatgear.com: gadget and electronic reviews   tutorialguru.com: free tutorials