The electorate is now witnessing a vivid example of this, arising from the separation of Anthony D. Weiner, a former congressman, and Huma Abedin, a top aide to Hillary Clinton. The F.B.I. is poring over their emails with a presidential election just days away.
Divorce lawyers and data analysts interviewed on Monday said less public versions of this story play out all the time.
“The problem is, once they’ve already engaged in bad behavior, it’s out there,” said John Slowiaczek, the president-elect of the American Academy of Matrimonial Lawyers. “You can’t recapture it, you can’t bury it.”
No matter a person’s level of technical skill, it can be difficult to hide digital behavior from a spouse, a spouse’s lawyers or, in Mr. Weiner’s case, federal investigators.
In August, Ms. Abedin, one of Mrs. Clinton’s closest aides and confidantes, informed her husband, a disgraced former congressman and mayoral candidate, that she wanted to separate after his latest sexting scandal. A federal investigation of Mr. Weiner revealed a trove of messages, including some belonging to Ms. Abedin.
Nancy Berg, the president of the International Academy of Family Lawyers and a partner at the law firm Berg, Debele, DeSmidt & Rabuse, said that it was not uncommon to see situations like that of Ms. Abedin’s, where, she said, “her husband’s garbage is destroying her life.”
In divorce proceedings, lawyers and investigators routinely mine public social media profiles for a glimpse into the activities of the client’s spouse.
But their investigations go far beyond that, as they sift through whatever data they can legally obtain for signs of hidden assets or to catch the spouse in a significant lie. Lawyers are likely more focused on questions of finance and child custody than lurid questions of adultery or betrayal.
Even so, a computer “tells you everything about a person’s character,” said Brook Schaub, a forensic analyst and licensed private investigator at the accounting firm Eide Bailly. It has “become the file cabinet, the stationery, the social networking, the everything,” he said.
The data that can become publicly available depends largely on the individuals’ penchant for privacy and how careful they have been. Even those who value privacy during the relationship are at risk of the former spouse finding sensitive data.
The first steps taken after the divorce process begins can be critical.
Christine Leatherberry, a family lawyer in Dallas, said she recommended that her divorce clients create a new email account, stop sharing calendars and turn off the ability for apps on their phones to track their locations.
Someone committed to finding embarrassing or otherwise discrediting information about a spouse can most likely find a way, especially if he or she is willing to flout the law. Such revelations may not be admissible in court, but they could bring professional ramifications or personal embarrassment.