How to bookmark website automatically without asking user/visitor of website in all browsers?

Following is click version, I want to bookmark website automatically in all browsers.

jQuery

$(document).ready(function() {
    $("#bookmarkme").click(function() {
      if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(location.href,document.title,"");
      } else if(window.external) { // IE Favorite
        window.external.AddFavorite(location.href,document.title); }
      else if(window.opera && window.print) { // Opera Hotlist
        this.title=document.title;
        return true;
    }
});

HTML:

<a id="bookmarkme" href="#" rel="sidebar" title="bookmark this page">Bookmark This Page</a>

Recommended Answers

All 6 Replies

How to bookmark website automatically without asking user/visitor of website in all browsers?

This will annoy a lot of users...

Anyway, why don't you just call: $("#bookmarkme").click();

I don't want to give choice to user. I want to remove anchor and bookmark automatically when user visits site.

I want to convert this function from click event to page load event

Member Avatar for stbuchok

Please, for the love of God, don't do this. This is a terrible idea and will only piss off your users.

Also, please tell me what site this is for so that I never visit it.

automatically bookmark website without asking user

No, thank you very much.

I can see how this concept could be useful for an Intranet, corporate site. However, as you see from the reaction here...you do understand that this would be very annoying to many of your visitors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.