Mobile device/lion battery lifetime preservation strategy

All batteries wear out with use. Every cycle you charge it diminishes the capacity just a little bit.

But I’m wondering what you can do to optimize the total battery lifetime of a mobile device (phone or tablet).

For instance, should you leave the device plugged in while you use it? In theory, they could have some sort of bypass mechanism whereby the power source directly powers the device, bypassing the battery entirely and sparing its use. However, I suspect that since the battery already outputs power with the conditions the device needs to function (voltage, etc), that when you plug devices in, the battery powers the device and the power cable recharges the battery.

So if you’re going to sit around and play a game for an hour on your phone or tablet, would it actually be better to leave it plugged in, unplug it and charge it after, or no difference?

Is it any different if you leave the device idling on standby? Is it better docked/charged while you aren’t using it, or just let it idle unplugged?

Is there a significant difference to the overall lifetime of the battery if you turn it off at night or whenever you won’t be using it for a few hours rather than just letting it sit in standby or on the charger?

I have to admit that I’m guilty of applying NiCd strategies to Li-ion batteries, i.e. letting them discharge completely before recharging. It turns out that this might not be the best for battery life:

http://www.techrepublic.com/blog/five-apps/five-tips-for-extending-lithium-ion-battery-life/289
1: Keep your batteries at room temperature
2: Think about getting a high-capacity lithium-ion battery, rather than carrying a spare
3: Allow partial discharges and avoid full ones (usually)
4: Avoid completely discharging lithium-ion batteries
5: For extended storage, discharge a lithium-ion battery to about 40 percent and store it in a cool place

http://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries

Just use the device.
Lithium ion and Lithium polymer batteries have a finite life. Whether you use them or not.
The charge controller built into your device will do whatever it can to prolong the battery’s life. Changing your charging strategy might extend the usable lifetime by a few percent, but it’s sucha small effect, you are better off just using your device in the way that is the most convenient for you - not for it.