Facebook has struggled with a number of privacy lawsuits in the past, but the social network was handed a big win yesterday when a US judge dismissed a case against the company over its tracking activities.

The lawsuit revolved around the way Facebook tracks people when they are logged out of the site. The platform installs cookies on users' browsers to track them whenever they visit websites that have embedded "Like" buttons.

The plaintiffs claim this essentially means Facebook is tracking users' web activity and is violating US federal and California laws around wiretapping and privacy. But U.S. District Judge Edward Davila in San Jose, California disagreed.

The judge said that steps could be taken to keep browsing histories private, adding that the plaintiffs failed to show Facebook illegally "intercepted" or listened in on communications.

"The fact that a user's web browser automatically sends the same information to both parties," Davila wrote, "does not establish that one party intercepted the user's communication with the other."

Plaintiffs also failed to demonstrate a reasonable expectation of privacy, or that Facebook's actions caused any financial loss or damages. While they won't be able to use the same arguments again, the plaintiffs can, if they wish, bring a new suit that pursues a breach of contract claim.

As Reuters notes, this is the second time Davila has ruled in Facebook's favor. He dismissed an earlier version of the same case in October 2015.

Mark Zuckerberg's firm will doubtlessly be pleased with the outcome, especially as it puts the onus on the users to protect their privacy, something many people aren't going to bother doing.