Click here to Skip to main content
15,909,822 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,
i want to refresh web browser after a period of time automatically because if i made any changes from admin panel of the website then it should be reflect on multiple users screen without pressing Ctr+F5 or any key from keyboard.. please help me.
Posted

There are a couple ways to do this. A simple one would be to put a meta tag in your site that has a refresh time and the URL to go to (the same one you are on). That will simply reload the page.

If you wanted to just refresh the content, an ajax or jQuery timer might be a better fit.

Here is a question similar to yours with a few options for you:

http://forums.asp.net/t/1315804.aspx/1[^]

Here is another good option:

http://blog.codebusters.pl/en/entry/refresh-content-automatically-after-some-period-time-jquery/[^]

Personally, I would rather see you refresh your data, since reloading your entire page is a heavier operation and it is not as clean. Having a site that flickers every x seconds because of a refresh isn't nice but having a site's data automatically update as new information comes in is cool.

If you want to get to the very cool stage, have a look at SignalR[^]. It allows for real-time updates to pages.
 
Share this answer
 
v2
use ajax timer control and and give time period in the properties the page will be automatically refreshed when ever it reaches the time period
 
Share this answer
 
One of the ways is to use META Refresh tag.

Like, to refresh page every 60 seconds:
HTML
<meta http-equiv="refresh" content="60"> 

Refer:
Meta Refresh Tag[^]
W3Schools: HTML <meta> Tag[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900