If you're looking for a joke grandma will like, stay away from the mean material.

Older adults disapprove of the kind of "aggressive" humor that comes at the expense of others, according to a new study published in the journal Psychology and Aging.

Researchers showed clips to young, middle-aged and older adults from television shows including "The Golden Girls," "Curb Your Enthusiasm" and "The Office." They found a generational gap on jokes that were deemed aggressive.

Jokes like ... this one:

Younger adults (17-to-21-year-olds) were more likely than middle-aged adults (35 to 56) and older adults (64 to 84) to endorse "aggressive" and self-defeating humor, which are showcased quite nicely by Larry David in these two "Curb Your Enthusiasm" clips. (Warning: They contain some NSFW language.)

Researchers showed 14 clips to the 84 adults, who were then asked to rate the social appropriateness of the behavior in each clip. They were also asked whether they thought each clip was funny. Researchers also monitored their facial movements.

Old and young adults alike correctly identified "inappropriate" behavior -- generally, behavior that's socially unacceptable, shown in all of the clips mentioned here. But there was a difference as to what kinds of humor participants in the research project liked.

Older adults tended not to find aggressive jokes as funny, leading researchers to believe that they aren't into humor that comes at the expense of others.

Jennifer Tehan Stanley, assistant professor at the University of Akron and the study's lead author, said humor preferences may reflect coping mechanisms that older adults need to face the challenges that come with aging, such as loss.

"It’s important to consider, when you see age differences, not to always go to a deficit model and try to consider that everyone’s approach to life and humor may be facilitating whatever their goals are for that particular life stage,” Stanley said. “It’s about what works for you and what helps you to function in your social and emotional domain.”

The biggest gap between generations came when researchers showed them this clip from "The Office," in which boss Michael Scott insults one of his employees and then tries to backtrack:

"If you were to want to improve communication between generations, you should take these types of differences into consideration," Stanley said.

The next level of study would be to track whether humor preferences change for individuals over time, she said. Will those young adults change their tastes as they age, or do preferences reflect specific, generational tastes? Will younger adults continue to enjoy this "Golden Girls" clip showcasing "aggressive" humor?

In the meantime, if you're looking for a show that everyone can enjoy, aim for ones that showcase "affiliative" humor: inside jokes that improve relationships with others -- laughing-with-not-at-jokes. The older age groups endorsed that kind of humor more than the younger ones did, but as a whole, all age groups rated it higher than aggressive humor.

Sorry, Larry David.