Using META Tags to Refresh Pages

If you think of current web application development trend then this solution will not fit for you, because this scenario post-backs complete web page. Today, we have many controls that update any defined section of website (web page) instead of whole web page gets post-back.

But we should know this way also so, let’s learn how to refresh web page using META Tags.

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 expire. An example of this is:

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

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="20">

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

The first example refreshes the current page in 20 seconds. The second example refreshes the page in 10 seconds, but refreshes it by loading the new URL.

I hope you like it. Thanks.

Comments

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System