Disable Auto Lock in Apps
Many times, especially when downloading something over Wi-Fi, we want to keep the Safari web browser alive. Unfortunately, there is no built in option in iOS to force an app to stay alive. However, you will have to jailbreak your iPhone or iPod Touch for that.
After jailbreaking, open cydia and search for “Autolock-disabled app”. How to use it? Just start your desired app and then start this application and your iOS device would not go into sleep mode.