faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

35 of 76 people (46%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How to refresh an include js file every 10 seconds?

Apr 5th, 2008 20:08
ha mo, Colin Fraser, jake the snake,


No, there is no point is just refreshing the included *.js file, 
however, you may want to try: 
<script language="JavaScript"><!--
     	setTimeout('location.reload(true)',10000); 
             // forces a reload from the server in 10 seconds
	document.write("Reloading from server");   //test line of code
 //--></script>
Just drop the document.write line when you are satisfied it works. 
Reloading the page from the server will automatically reload the *.js 
file as well.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com