Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I tried to do that with CSS :visited selector, but without success at first - I'll try again as soon as I'll have time!


Modern browser won't let you change :visited selector except color... because of security. A random webpage would have the knowledge of pages you have visited then :) I think IE7 and below have that bug. And you can't check the color of a visited link with javascript.

You were able to build a list of controversial webpages (to compare them with my browser history), put to your css file that a:visited color: red; (just an example) and check with javascript which links have foreground color red - and voilaa. You know what pages I have in my history.

You need to save data to localstorage or something like that instead. And you can only save those clicks which are made from hackernews site... not populate it from browser history.


I'll have to try with just css then. I can't keep track of all clicks :)


But you can't identify which links are visited... because of security issues I described. Sorry my english is horrible maybe I described it very in a very bad way.

https://bugzilla.mozilla.org/show_bug.cgi?id=147777

It is fixed in modern browsers now...


You can't with javascript, but the a:visited selector works in pure CSS, doesn't it? I'd like to do it so that I don't know which links you actually visited, but you would see them in a different color anyway. I think this should work somehow, I'll have to make some more tests.


You can only change the color, nothing else... :)


And that's all I need ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: