Tuesday, March 27, 2018

How to autorefresh page without using any Javascript

     
     You can use the <meta> Attribute to auto-refresh your web page. All you need is the following line of tag in your page.

<head>
 <meta http-equiv="refresh" content="15">
</head>

  •     refresh tells to browser to auto-refresh the page.
  •     content controls the the time interval for the auto-refresh. you can specify the url in content too. content="15;URL='http://yoururl' " is a valid value for content.

You need to be careful when you are using this specially if your page contains any forms. Unsaved data will dissapear because of autorefresh and you might end up with many upset users. You can instantly redirect all users to a different page by using the following combination.

<head>
 <meta http-equiv="refresh" content="0; URL='http=url'">
</head>

1 comment:

  1. While reading different blogs I came to know this blog. We can contribute the ideas of this blog in http://www.chemistryassignmenthelp.com/ categorical work. But the thing is that we will get this blog beneficial for all types of readers and writers also. This is a good blog in its own sense.

    ReplyDelete