Many posts address this for iPhone apps, but I need to know how to do this for javascript on a web page.
My specific problem is that I want to track the device's location over a long period of time (say a car trip). This becomes a problem when the device sleeps (and maybe during a phone call, I haven't tried that case yet).
I'm open to any ideas, including preventing sleep mode (but since I'm in Safari, I'm not sure how much control I'd have to do that).