From the Wikipedia entry on lithium ion batteries:
Guidelines for prolonging Li-ion battery life
* Like many rechargeable batteries, lithium-ion batteries should be charged early and often. However, if they are not used for a long time, they should be brought to a charge level of around 40%–60%
* Lithium-ion batteries should not be frequently fully discharged and recharged ("deep-cycled"), but this may be necessary after about every 30th recharge to recalibrate any electronic charge monitor (e.g. a battery meter). This allows the monitoring electronics to more accurately estimate battery charge.[25]
* Li-ion batteries should never be depleted to below their minimum voltage, 2.4 V to 3.0 V per cell.
* Li-ion batteries should be kept cool. Ideally they are stored in a refrigerator. Aging will take its toll much faster at high temperatures. The high temperatures found in cars cause lithium-ion batteries to degrade rapidly.
* Li-ion batteries should not be frozen [43] (most lithium-ion battery electrolytes freeze at approximately −40 °C; however, this is much colder than the lowest temperature reached by household freezers).
* Li-ion batteries should be bought only when needed, because the aging process begins as soon as the battery is manufactured.[25]
* When using a notebook computer running from fixed line power over extended periods, the battery should be removed,[44] and stored in a cool place so that it is not affected by the heat produced by the computer.
And, for more advice than anyone likely needs, in the iPhone forum here:
https://forums.macrumors.com/threads/525741/