4 Handy Things with HTML Meta Tags - You may Not know

Meta Tags are generally used to store on a webpage. But Infact, it is a information of the webpages for browsers and search engines to know about the webpage, and to determine the information about the content of the web page.

There are many handy works we can do with the HTML meta tags. The most commonly used meta tag is meta description tag because they are very necessary in SEO to rank website better.

But along with these tags there are still many others by which we can do a lot of handy and helpful things and most of us don't have knowledge about them. So, here in this post I have put 5 Handy Things which you can do with HTML Meta Tags.
things with HTML meta tags


Setting of Cookies

First what is Cookies? Cookies is a small piece of information or data which is stored in browser by the websites which you have visited(those who use cookies). Websites also reused the saved cookies to tailor the functionality. Can't understand?? Let's take an example, if you go to any online store and add some items in your cart but payout yet and you leave the browser. And when you again come to that site you still see your that selected items in your cart. And this happens due to cookies. The data may stored to several days to months.

How to set cookies

You can use the below code to set the cookies.:
<meta http-equiv="Set-Cookie" content="name=data; path=path; expires=Day, DD-MMM-YY HH:MM:SS ZONE">

In the code, term name=data is the name of the cookie which determines the value. The term path is the Path of the document. The term expires tells that how much time after the cookies will expires means deleted from your PC or device. If the area for expires stay blank then the cookies also deleted when you close the broswer.

 To Refresh page

Meta tags are can also be used to refresh the pages. You can also set the time duration for refresh. For example if you set the time 5 seconds then after 5 seconds the page will automatically refresh.

How to Use

The below code is used for this
<meta http-equiv="  refresh" content="5">

In the above code In content property you can set the time duration for the refresh.

Redirecting to another page

By using meta tags you can also redirect your visitors to another web page. The working of this method is same as refresh page has, but there is some minor modification require to redirect to another page.

How to Use

<meta http-equiv="refresh " content="5; url=http:// example.com/">
In example.com paste your URL by the address where you want the visitors to redirect.

 To Disable Browser Cache

Meta tags also be used to disable the browser cache. When you visit any webpage your browser store a cache of it to load faster when next time the page loaded. Some times you noticed that you made some changes in your site and when you refresh the page is same. This is due to browser cache. To disable that you can use meta tags.

How to Use

You can use the below to prevent your browser to store cache:
<meta http-equiv="Cache-Control" content="no-store" />

Final Words

I hope that you like this article and find it helpful. By these Little meta tags we can do bigger works which do large chunk of codes. Let me know what you think about them?
4 Handy Things with HTML Meta Tags - You may Not know 4 Handy Things with HTML Meta Tags - You may Not know Reviewed by Maher Afrasiab on 6:23:00 pm Rating: 5

No comments:

Powered by Blogger.