Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to make page refresh automaticaly and smoothly...jst like the way facebook does it?? :-\
Posted
Comments
Mehdi Gholam 25-Sep-11 1:51am    
You have to use partial postbacks and AJAX and javascripts etc.
Herman<T>.Instance 25-Sep-11 1:58am    
set it as answer.
shakil0304003 25-Sep-11 2:22am    
Use google 1st!

AJAX, Javascript, jQuery and good thinking is the answer
 
Share this answer
 
Comments
Mehdi Gholam 25-Sep-11 2:12am    
My 5! especially the good thinking!
JavaScript
<html>
<head>
<script type="text/JavaScript">
function timedRefresh(timeoutPeriod) {
	setTimeout("location.reload(true);",timeoutPeriod);
}
</script>
</head>
<body onload="JavaScript:timedRefresh(5000);">
</body>
</html>
 
Share this answer
 
Comments
RaviRanjanKr 16-Oct-11 17:08pm    
My 5+ for easy code.
well, first of all, Facebook does partial page updates and async post backs. If your website is a dynamic one then that's your port of call too (i.e. AJAX Control Toolkit and UpdatePanel), otherwise, using a Javascript you can time to refresh the page every so often. For pages with not lots of data all over, i wouldn't recommend using AJAX only otherwise.

Don't think this is a solution per se, but a comment would have been overlooked...

Cheers...
 
Share this answer
 
it is simply you can press f5 buttion
 
Share this answer
 
Comments
Orcun Iyigun 26-Sep-11 2:30am    
i dont know why you give this as a solution but i dont think you read the question carefully. It is indicated automatically and tagged as coding languages.. funny..
bbirajdar 15-Nov-11 9:23am    
He is in fact joking
Use the HTML tag

HTML
<meta refresh="..."></meta>
 
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