Depression can compromise a person’s quality of life, and it doesn’t go away as you get older: About 10 million elderly Americans are affected by depression. It can even shorten their lives.

A new study suggests a potentially interesting way to reduce depression in seniors: Get them to spend more time on the Internet.

Using the Internet regularly was linked to a 30% reduction in depression.

Researchers looked at data on about 3,000 older people who took part in the Health and Retirement Survey over a period of six years. Every two years the participants answered questions about their daily habits, mental health, and, of course, their Internet use.

The Michigan State University researchers were especially interested in how existing depression may or may not be affected by starting to use the Internet.

The MSU researchers found that depression was strongly affected by a person’s online activity. In fact, using the Internet regularly was linked to a 30% reduction in depression.

“That's a very strong effect,” study author Shelia Cotten said in a news release. “And it all has to do with older persons being able to communicate, to stay in contact with their social networks, and just not feel lonely.”

Screen time hasn’t exactly gotten great press lately. It’s been linked to all kinds of problems in children — from depression to diabetes and obesity. Social media sites like Facebook have even been found to increase unhappiness in adults.

That's why these findings add a useful new perspective on Internet use. For people who may be using it in place of in-person communication, time online can increase a sense of disconnection and loneliness. For seniors, who are older and perhaps more isolated to begin with, however, using the Internet to reach out to old friends or online groups may be an important way of sparking connection.

“If you sit in front of a computer all day,” says Cotten, “ignoring the roles you have in life and the things you need to accomplish as part of your daily life, then it's going to have a negative impact on you. But if you're using it in moderation and you're doing things that enhance your life, then the impacts are likely to be positive in terms of health and well-being.”

Some people who started out depressed remained so, even after beginning to use the Internet. But for most people, spending time online actually seemed to help with existing depression.

The results point to an interesting avenue for helping the elderly avoid depression. Of course, other methods for treating depression — like talk therapy, exercise, and meditation — shouldn’t be dropped in favor of computer time.

The Internet can be an important resource for seniors, particularly among those for whom getting around may be difficult. Parents can stay in touch with their children and grandchildren, sharing photos and video chats.

The study is published in the Journal of Gerontology: Psychological Sciences and Social Sciences.