We suggest replacing smoke detectors at least every 5 to 7 years, as their sensors will usually begin failing after that period (even though their alarms will continue to sound when their test buttons are pressed).
Smoke detectors may be periodically checked for response to actual smoke by homeowners. (Try using a short candle at the bottom of a tall glass jar. The candle will tend to produce a lot of smoke due to lack of oxygen, and the jar will keep hot wax off hands and carpeting. However, if such testing is done too frequently, the smoke may prematurely coat the sensors with a film that could block their sensitivity.)
We also suggest the installation of carbon monoxide detectors to protect all sleeping areas whenever combustion appliances are present in the home.