Rogue websites exploit flaw to track your web history

Researchers uncover detailed "history sniffing" practices at hundreds of Websites.

Be careful the next time you visit some of the Web's most popular porn, news, and torrent sites as they could be peeking at your browser history without your consent. Researchers at University of California, San Diego have discovered that 485 of the 50,000 most popular Websites in the world are exploiting a flaw that lets them read your browser's Web history. The offending sites include,,, and, according to the researchers.

Called history sniffing, the combination of JavaScript and Cascading Style Sheet (CSS) properties enables the sites to figure out where you've been on the Web. The researchers' findings are published in a new study entitled "An Empirical Study of Privacy-Violating Information Flows in JavaScript Web Applications."

If you want to make sure you're protecting your Web browsing history from bad actors, read on to learn how history hijacking is done and how you can prevent it.

History Sniffing

CSS is a Web development language that controls many elements of a Web page's layout and is a commonly used tool among Web developers. One property of CSS is the "a:visited" property that displays visited Web links in a different color (typically purple) from links you haven't visited (typically blue). These properties are stored by your browser so that it can display the appropriate color for every link you come across on the Web.

What history hijackers do to find out where you've been is hide on their Web pages some invisible Web links to third-party sites such as Amazon, Twitter, and Facebook. Then the spying sites use a snippet of JavaScript code to find out from your browser what color the hidden links should have. After that's done, it's pretty straightforward to create a list of sites your browser has visited and sites it hasn't.

Who's Tracking

Although the researchers found 485 sites are exploiting the history-sniffing flaw, 46 of those sites are actively downloading your browser history. The researchers also found that another 17 sites for a total of 63 are transferring your browsing history to their network, but couldn't confirm the sites were using the information collected. The majority of sites, according to the UC San Diego researchers, are only inspecting the style properties and nothing more.

Reading over the researcher's findings, it's amazing to see how many hidden links are used by each site. About 18 of the offending 46 sites, such as,, and, are using the exploit to analyze your past visits to more than 220 sites., an amateur porn site and one of the 100 most visited sites on the Web, analyzes your browsing history for more than 21 sites, according to the researchers.

History sniffing is nothing new, but the UC San Diego study shows just how prevalent this exploit is. The researchers even say that some Web analytics companies such as Tealium and Beencounter provide history-sniffing services to their clients.

History-Sniffing Implications

It's easy to get carried away with the fear that your browsing history could be used for some nefarious purpose. One possibility could be building a profile about you based on your browsing history and other information collected by the site.

But there are also more benign uses of history sniffing that can actually make your browsing experience better, some Web developers argue. Blogger and Web developer Niall Kennedy points out that you can use history sniffing to determine which social networking sites you visit and show you "share" or "like" buttons only for those specific sites. Other uses include targeting you with your favorite blog aggregation service such as Google Reader and Netvibes, instead of showing you every RSS reader link on the planet. Or displaying mapping services you are more likely to use, such as Google Maps or MapQuest when you click a "show map" link.

There's no question, however, that having a Website target you in such a specific way can, as Google CEO Eric Schmidt might say, "cross the creepy line."

If you don't want your history sniffed or hijacked, there are several things you can do. Many modern browsers, including Google Chrome, Apple Safari, and Mozilla Firefox are able to defend against history sniffing. Internet Explorer may also defend against this attack if you use the browser in private browsing mode. If you want to make sure you are completely protected, you could also use the Firefox browser add-on NoScript that prevents sites from running JavaScript in your browser. Firefox users could also disable CSS visited links by modifying the browser's about:config file.

In addition to history sniffing, the UC San Diego researchers also looked at how major sites such as YouTube and The Huffington Post use scripts to track your mouse pointer movements. You can find the complete study here.

Connect with Ian Paul (@ianpaul) and Today@PCWorld on Twitter for the latest tech news and analysis.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags securityUniversity of CaliforniaSan Diego

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Ian Paul

PC World (US online)
Show Comments


James Cook University - Master of Data Science Online Course

Learn more >


Sansai 6-Outlet Power Board + 4-Port USB Charging Station

Learn more >

Victorinox Werks Professional Executive 17 Laptop Case

Learn more >



Back To Business Guide

Click for more ›

Brand Post

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?