You might have noticed that whenever your iPhone or iPod Touch goes into sleep mode, your Wifi connection is terminated automatically and when you press the Home or Power button, it is activated again. Although its a good precaution set by Apple to save your iPhone battery but sometimes it is quite tiresome job to keep your iPhone from going into sleep mode specially when you are downloading a YouTube video. Follow the guide below to keep your Wifi on even your iPhone goes to sleep mode.
All you need is two things: Activator and KeepAwake. Both of these tools are available via Cydia. Activator can be installed via BigBoss repo and KeepAwake can be installed via iSpazio repo. Both of these repositories are pre-installed with Cydia. So there is no need to add any repository. Just open Cydia and search for Activator and KeepAwake as shown in the screenshot below:

Install both of them and reboot your device.

Once Activator and KeepAwake is installed, navigate to Settings->Activator->Anywhere->Volume Buttons (Display Tap). Now scroll down and select KeepAwake under SBSettings Toggles section.

To activate or deactivate your Wifi, click on the volume buttons on the side of your device and tap on the speaker icon once to toggle the Wifi mode.





