Contact us

March 22, 2006

Firefox add to favorites code

Filed under: seoKevin Gibbons @ 12:49 pm

I have updated the javascript code, below, for my website as I noticed the add to favourites link didn’t bookmark websites in Firefox. I have now updated the code so that this is compatible with both Firefox and IE but I’ve noticed this is opening the url in the sidebar window instead of a full browser page. If anyone knows how to fix this please let me know as so far I’ve only found examples which do the same or only work in IE.

Firefox add to favorites code:
<script type=”text/javascript”>
function bookmarksite(){
if (document.all)
window.external.AddFavorite(location.href, document.title);
else if (window.sidebar)
window.sidebar.addPanel(document.title, location.href, “”)
}
<% /script>
<% a href=”javascript:bookmarksite()”> Add to favorites< /a>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Propeller
  • NewsVine
  • Reddit
  • StumbleUpon
  • Technorati
  • TwitThis

6 Comments »

  1. thanks, works well

    Comment by Anonymous — December 3, 2006 @ 12:29 am

  2. Do you know the code for Safari and Opera? just curious.

    Comment by Pradeep — April 16, 2007 @ 8:43 pm

  3. Not tested but I believe the code for safari would be something like:

    a href=http://www.google.com” title=”Google web search” rel=”sidebar”

    As for Safari I have no idea, I found this page while googling how to do it in Safari.

    Comment by Anonymous — April 29, 2007 @ 9:44 pm

  4. it dosent work

    Comment by brandon — July 31, 2007 @ 9:17 pm

  5. thanks for code..i will use it.

    Comment by offshore software development — September 15, 2007 @ 6:24 am

  6. good script.. I will use it in one of my sites!

    Comment by Anju — September 25, 2008 @ 7:05 am

Leave a comment

Subscribe

RSS Feed


What is RSS?

Subscribe by email:

Top 10 Popular Articles

10 Ways To Make Your Website More Popular
5 Web Design Elements to Earn Your Visitors Trust
78 Essential Search Engine Marketing & SEO Resources
Which Domain Internationalisation Strategy to Use?
Why Google Universal Search Should be Part of Your SEO
Top 10 Fatal Localisation Mistakes
How To Increase StumbleUpon Traffic?
Ultimate Social Media Optimisation List
User Generated Content Can Ruin Your SEO
6 Reasons Why Link Building Is So Hard

Latest SEO Blog Posts

Google Sending Invites to Google Friend Connect - Join SEOptimise!
30 Tips on How to Get, Convince, Keep and Deal With Clients, Be it in Web Design, Writing or SEO
Using Google Analytics Advanced Segmentation to Get Proper Ad Scheduling Data
12 Indispensable Readability Measures to Increase Conversions
6 Resources for Finding Negative Keywords
30+ Very Useful Twitter Tools You Must Be Aware Of
Google SEO Starter Guide is Great News for Small Businesses
Google Analytics Tip - How to Find All AdWords Search Queries Triggered from Phrase/Broad Matches
Keyword Research: 7 Keyword Modifiers to Optimise New Websites For
The Lazy Bloggers Guide to Quality Content & Social Media Success
"If we knew what it was we were doing, it would not be called research, would it?"Albert Einstein (1879 - 1955)