简体   繁体   中英

Is a mailto href ever considered visited?

I styled the <a> element as follows

a:link {color:#FF0000;}    /* unvisited link */
a:visited {color:#00FF00;} /* visited link */
a:hover {color:#FF00FF;}   /* mouse over link */
a:active {color:#0000FF;}  /* selected link */

In the following using Firefox, Opera, and Chrome

<a href="mailto:userid@xyz.edu" >send email</a>

All the colors act as expected except that it is never marked as visited. Is there someway to make it visited?

This is one place IE seems to excel as it does get marked as visited!

mailto is not displayed as visited. I would try jquery to change the color.

NO. Visited highlight also work for mailto link on "a" tag. With following conditions..

  1. When ever you click on mailto link from any browser on a page, it will trigger your default mail-to browser or application like outlook. I am correct?.

  2. So highlight function only work, when your current browser(where you seeing have mailto link page) and default mailto browser are same.

  3. For example if you are seeing the page in Mozilla firefox, and mail compose option is opened on firefox then highlight style must be added by browser by default as usual links. Else your compose option opened on chrome or IE or Outlook highlight style not added by browser.

So leave as it is. If you need as compulsory append style when click on link, using JS or JQuery.

它不像其他人已经告诉你的那样被视为访问,但是如果你想让它看起来像访问,这可能会帮助你: 使用javascript将链接标记为已访问

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM