People with frontotemporal dementia also appeared to develop a darker sense of humour, taking delight in other people's misfortunes. And when they made jokes they tended to be graphic, smutty or childish in their subject, according to the study. Many stopped laughing altogether. The same was not true of Alzheimer's sufferers.
While Alzheimer's disease is the leading cause of dementia, frontotemporal dementia is the most common cause of dementia in the under-55s.
Friends and relations reported seeing the changes in sense of humour for both forms of dementia an average of at least nine years before the start of more typical dementia symptoms such as memory loss.
Dr Camilla Clark who led the research at the Dementia Research Centre, UCL, said: "As sense of humour defines us and is used to build relationships with those around us, changes in what we find funny has impacts far beyond picking a new favourite television show.
"These findings have implications for diagnosis - personality and behaviour changes should be prompts for further investigation, and clinicians themselves need to be more aware of these symptoms as a potential early sign of dementia.
"As well as providing clues to underlying brain changes, subtle differences in what we find funny could help differentiate between the different diseases that cause dementia.
"Humour could be a particularly sensitive way of detecting dementia because it puts demands on so many different aspects of brain function, such as puzzle solving, emotion and social awareness."
The study was published in the Journal of Alzheimer's Disease.