1. Using JavaScript to get the rendered style, and thus work out whether you've visited a particular URL, or
2. Setting background images on links which only apply when visited, and checking whether your browser retrieved those images.
It's a rather old and well-known trick.