Right out of the box, Apple’s lineup of mobile devices will do anything they can to conserve battery power when specific hardware functions aren’t necessary. For example, they may disconnect from Wi-Fi when locked for prolonged periods; think of it as a hibernation mode.
It’s a brilliant power savings feature, in theory, but it sometimes hinders workflows by imposing internet connection delays in which you’re forced to wait for connection reestablishment after unlocking. Fortunately, a free jailbreak tweak called iNoSleep by iOS developer Tony Kraft solves this problem.