The existence of detailed logs like the ones Google and Yahoo compile has never been a secret among technology insiders. Owners and developers of websites naturally want to have data on what's being viewed, how often and by whom, as this helps in analyzing and improving operations and in spotting malicious attacks. In some ways, it is no different than in the offline world, where businesses like to keep a careful eye on their inventories and customers.

Yet neither Google or Yahoo has exactly called attention to the fact that it keeps comprehensive records on its users' movements. Google has been around for seven years now, Yahoo for nearly 11, yet the vast majority of visitors to these sites remain unaware they are being tracked. Precisely because it might scare off users, this revelation is kept in the fine print of privacy policies, which few people read. Google doesn't even link to its privacy policy from its lily-white home page. (Is that "evil"?)

So last month's news that the Justice Department had subpoenaed search records from Google, Yahoo, AOL and Microsoft came as an eye-opening jolt. Loyal users, investors and the media began asking long-overdue questions. What exactly was in those records and for the taking? Could search engines produce lists of what searches came from what Internet addresses?

Tech-news site CNET posed a series of specific questions along these lines to several major search engines, but many of the responses were comically short on detail. "We keep data for as long as it is useful," said a Google spokesman when asked if records were ever purged. A Yahoo rep offered this: "We maintain data that will help us provide users with the best possible experience."

The specifics of the Justice Department subpoena were as follows: Federal prosecutors, hoping to revive a previously overturned law protecting minors from exposure to pornography, went googling for data that would buttress their case. (Some early reports about the subpoena said the law in question dealt with child pornography, which was not true.)

Initially, the government demanded a list of every website address available on Google and every search term entered during July 2005 -- a staggering amount of data, considering that Google handles 300 million searches per day. The request was later narrowed to a list of 1 million random Web pages and all the search queries for a given week.

Perhaps trying to show off its bureaucratic muscle for data-crunching, the Justice Department also requested similar information from Yahoo, America Online and Microsoft, all of which have said they turned over some aggregated data, though they have not specified how much.

Their compliance with the subpoena is disappointing from a privacy standpoint, but it does not add up to a doomsday scenario. None of the search engines released any personally identifiable information to the government, nor were they asked to.

Google, to its credit, gallantly refuses to turn over any data at all. The company is being seen by many as taking a stand against the Bush administration, which is not well liked in Silicon Valley. "The demand for the information is overreaching," Google attorney Nicole Wong told the San Jose Mercury News, which broke the subpoena story. Google co-founder Sergey Brin later told Bloomberg, "We don't think it's a proper subpoena for some legal case; it's not anything we're even a party to." (A court hearing is scheduled for Feb. 27.)

Brin's main reason for putting up a fight, of course, is to protect Google's business. The Internet is as hotly competitive as ever, and while Google holds a commanding market share in search, Yahoo is still the most visited website in the world and Microsoft is still king of the desktop. Google does not want to give them or anyone else a window into its proprietary information. Nor does it want to see a precedent established for regular government trawling of its data, which might make users and investors skittish.

But Google has its work cut out, in part because of the high expectations it has set for itself. Even as the search leader seems to be standing firm against the Department of Justice, it sent the opposite signal last month when it rolled over and acceded to the Chinese government's wishes.