Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

a:visited is not working on mozilla but works fine on IE

Tags:

css

a:visited function works fine on my IE but not on mozilla. It has no effect on Mozilla. Css class is

            ul#menu1 li a:link, a:visited { 
    display: block; height: 18px; padding: 5px 0 6px 15px;
    text-decoration: none; clear: both; color: #666; 
             }
like image 283
Gendaful Avatar asked Nov 30 '22 17:11

Gendaful


2 Answers

The visited style has been removed from Firefox (and most other browsers) in recent versions due to a security issue with it.

The problem is that a malicious web site could work out your browsing history by using it - they would set a visited colour, produce a load of URLs (even hidden ones so the user doesn't know about it), and check their colour. It caused quite a bit of noise in browser security circles a couple of years ago.

The visited feature can be switched back on again in Firefox, by going to the security preferences, but it is disabled by default, and most users will have it switched off.

See here for more info on the problem and how Firefox went about fixing it: http://blog.mozilla.com/security/2010/03/31/plugging-the-css-history-leak/

like image 191
Spudley Avatar answered Dec 09 '22 20:12

Spudley


Try changing your order so that it is :link, :visited, :hover, :active

Also ensure that your Mozilla options are set to remember your browsing history. If it doesn't remember the history, it can't know what you have visited or not.

Edit: It doesn't look like Mozilla has disabled the ability to differentiate visited links, but it appears that they have limited what properties you can use. See here for more details.

like image 40
Brandon Avatar answered Dec 09 '22 21:12

Brandon