Before getting into the detail of how to protect laptop batteries, let's look at the technology. It will help answer the question and also shed light on another, "what is a reasonable life for a laptop battery?"
Most portable electronic devices including laptop computers are now powered by lithium-ion batteries. Lithium-ion superseded nickel metal hydride technology providing superior power to weight ratio, a longer discharge cycle, absence of the "memory effect" and a lower cost.
Under optimum conditions, lithium-ion batteries will provide excellent service over 300-500 discharge cycles, which equates to 2-3 years of laptop usage. That is also the average life of a laptop computer. At that age hard drives become susceptible to problems and there will be a new version of Windows that struggles to boot on this now obsolete laptop.
Two to three years is a good life for a laptop battery. At that stage an investment in a replacement is seldom a wise idea. The laptop is living on borrowed time.
We need to know how to protect laptop batteries because:
They're expensive to replace.
They dicatate how mobile we can be.
Laptop security - over 10 million Lithium-ion batteries batteries have been recalled as a consequence of incidents where they have over heated and spontaneously caught fire.
Guidelines on How to Protect Laptop Batteries
Avoid placing laptop computers in direct sunlight or parked cars where temperatures can reach over 140° F. Extreme temperature ranges will at the very least shorten batte