Daemon Thread in Javascript
问题 I have a program that gets a JSON from the server using getJSON and processes this data and presents it to the user. But the data on the server is being updated every so often. How can I get the new JSON every 5 minutes and display it to the user and do it in a background thread? Can I use setTimeout for this? Thanks! Matt 回答1: Using an interval that fires every 5 minutes is the obvious (and most browser-compatible) approach. This does not create a separate thread, but is the traditional