Thursday, September 19, 2024

Create a Bookmarking/favorites Script

With so many sites on the web, it’s challenging to gain the attention of visitors for more than 60 seconds – and even more challenging to get them to return.

Encouraging people to “bookmark” or add your site to their favorites is one of the many simple strategies you can use to encourage repeat traffic.

It’s not enough to rely on the fact that browsers have favorites/bookmarking functions only a few inches away on the toolbar – visitors need to be encouraged to bookmark – and for it to be as easy as possible for them to do so.

With the script below you can create custom text and set the page you want bookmarked – it could be a different page to the one that your visitor is currently viewing.

<script LANGUAGE="JavaScript">

// This script can be used within tables.
// Suitable for most 4+ Browsers. Copy and paste into a text editor first,
// change the YOURWEBSITE details to suit, then paste into appropriate area
// between <body> and </body> tags in your page source code.
// Script supplied courtesy of ThinkHost - http://www.thinkhost.com

if ((navigator.appName == "Microsoft Internet Explorer")
&& (parseInt(navigator.appVersion) >= 4))
{
var url="HTTP://www.YOURWEBSITE.COM/";
var title="YOURWEBSITE DESCRIPTION (this will display on favorites listing)";
document.write('<A HREF="javascript:window.external.AddFavorite(url,title);"');
document.write('<small>Bookmark YOURWEBSITE!</small><br></a>');}
else {
var msg = "<b>Bookmark YOURWEBSITE!</b>";
if(navigator.appName == "Netscape") msg += " <b> - press(Ctrl-D) on your keyboard.</b>";
document.write(msg);
}
</script>

While the script functions best in Internet Explorer, users of older versions of Netscape will be shown a prompt to bookmark the page by using the Ctrl +D key combination.

Michael Bloch is the Business Operations Manager of ThinkHost, a USA based company that has been providing hosting solutions to the world since 1999.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

Connect with potential clients.