The browser history can be determined within javascript by detecting the color of the link. This can only work by trying different url's and we cannot get every history object.
<script>
function urlvis(url){
document.getElementById('gurl').innerHTML="<a id=geturl href="+url+" >^</a>";
x=document.getElementById('geturl');
color=document.defaultView.getComputedStyle(x,null).getPropertyValue('color');
if (color=="rgb(85, 26, 139)") visited=true; else visited=false;
document.getElementById('gurl').innerHTML="";
return visited;}
</script>
<div id=gurl></div>
Now make a hidden element in your page that can be controlled by innerHTML. NOTE That this method has only been tested to work with firefox.
EDIT:
While this was a working method once, most newer browsers will not allow you to get an accurate reading of a link's computed style. I have noticed this change starting in Firefox 4. It's about time anyways, it was a privacy concern.