Tapping into your browser history

Tags:

Tapping into your browser history

위 링크를 클릭해보세요. ㅎㅎ 그러면 당신이 방문했던 사이트의 목록이 나타납니다. 원리는 다음과 같습니다.

A New Way of Tracking Users’ Browsing Habits

Jeremiah Grossman came up with a really clever way of using Javascript to find what pages you’ve visited recently. It goes like this: when a link has been visited, you can use the :visited pseudo-class to style it. Using Javascript, you can walk through all of the links on your page and grab their styles; comparing a link’s style to the style given to visited links in the CSS will tell you whether or not a site has been visited.

즉, 1) :visited의 CSS속성을 바꾼다. 2) 다음, 여러 url을 document에 추가해보면서 그것의 CSS속성이 방금 정의한 :visited와 대응되는가 본다. 3) 만약 대응된다면 history를 알 수 있다. 와 같은 순서를 따르는 것입니다. 문제점은 brute force로 찾아야한다는 것.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *