Keep the computer plugged in whenever possible.
If you keep the computer always plugged in, make sure that at least twice a month
run it on battery until battery charge level drops to about 50-40%.
Please don’t discharge the battery completely. Discharging battery completely will reduce battery health.
For more useful info:
Section: Optimizing Battery Life
http://support.apple.com/en-us/HT204054
Quoting from below linked article.
“The question is often asked: “Should I disconnect my laptop from the power grid when not in use? Under normal circumstances this should not be necessary because once the lithium-ion battery is full, a correctly functioning charger will discontinue the charge and topping charge will only engage when the battery voltage drops to a low level. Most users do not remove the AC power, and this practice is safe.”
http://batteryuniversity.com/learn/article/bu_808c_what_the_user_can_do