It's scary what information any website can retrieve from your browserhistory. Actually turning off Java, Flash or Javascript won't help. Even deleting all your cookies doesn't do the job.
The Basic idea is to have a long list with many (popular) links. Now as you surely know, links you've visited once are often rendered different (eg. dark purple color). Using CSS, it is possible to detect these differently styled links and therefore the previous visited sites can be determined.
Of course, one can only tell which links on this particular list have been visited and luckily not every single history entry is displayed. However, this method works in all common browsers and could be regarded as a flaw in the current way the web works. Imagine, if you were a webmaster, you could check if any of your visitors has issued a certain search query on google (google search queries can be used as links: example).
For further reading on this topic I recommend the page "What the internet knows about you" (It also contains a demo figuring out if you have visited any of 5000 popular links).