Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a Bookmark link that works in Safari

I have tried using JavaScript "AddFavorite" function in my code, but it does not work in Safari. It works in IE, I think I remember Firefox, but nothing I have tried seems to work in Safari. All I want to do is have a link on my website that people can click on and it automatically creates a bookmark in their bookmarks folder/bookmark bar.

Does this entail Applescript or something like it? Or a deeper programming language I am unaware of?

<a href="javascript:bookmarksite('Name', 'website.com')">
like image 885
bethany Avatar asked Jun 29 '12 15:06

bethany


2 Answers

From the apple forums: forum-link

On the Mac side at least, Safari does not allow a website to add a bookmark. I'm pretty sure the same behaviour is in the Windows version as well.

like image 62
Tarantoga Avatar answered Oct 05 '22 08:10

Tarantoga


I've been down this road, and what I discovered was that Safari does NOT allow bookmarks to be made with JavaScript:

Apple Forum

bytes forum

They consider it unsafe. As frustrating as this is, I get their point.

like image 25
Dave Alperovich Avatar answered Oct 05 '22 07:10

Dave Alperovich