Javascript is downloaded to and run on the client machine. So if you are repeating the call in the javascript every 30 seconds it will stop calling as soon as the user leaves the page (closes the browser, clicks on a link, types in a new address).
If your JS is calling a script on the server (PHP, ASP, C#,..etc) and the server script that is running in the background is doing the 30 second call then it will keep running in the background until it either times out or you phyically go on the machine and kill the process.
TIP: trying googling the answer before posting, you'll find that more times than not someone else somewhere has had the same request and posted an answer online.
----
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javascript enabled browsers