Javascript Add to favorites (bookmark this page) works for IE and Firefox

Javascript Add to favorites (bookmark this page) works for IE and Firefox

You can earn more repeated visitors by making them to bookmark your page. Keyboard shortcuts to bookmark favorite pages are: (Ctrl+D) for IE and Firefox, (Ctrl+T) for Opera. Some people like the old way to bookmark a page by adding your page to favorites (IE) or bookmarking (Firefox). Many online examples show you the only way to make bookmark button which only works for IE but not for Firefox. Today both IE and FF users hold significant share of browser distribution over the world with a tendency for Firefox to be the leader. So having bookmark script wich works for both major browsers (IE and FF) is a best solution for your site.

See yourself that this Javascript is working by testing it right now. Click the

page to show how bookmarking works with IE and Firefox

link and check with Firefox and IE browsers to see that it brings the bookmark window.

ie-bookmark

ie-bookmark

How to put “Bookmark me” button to your site?

  • At first download this javascript file functions.js and save where your page containing “bookmark me” button resides.
  • Add this code line just before </head> tag in your html, php or other type web page.<script type=”text/javascript” src=”functions.js”></script>It shoud look like:

  • Anywhere in your webpage (or blog template) place this piece of code:
    <a href=”javascript:favorite(‘Text, representing your website’, ‘http://YourSiteAddress.com’);”>Any text inviting your visitors to bookmark! </a>
    This will create a link with javascript function attached to it and open browser’s bookmarking window.

Tip: The example above will bookmark your home page. You can make the link of exact page visitor is viewing by putting a variable in Javascript file.


, , ,

Comments are closed.