Improve Site Performance Increase Site Traffic Monitor Site Uptime Webmaster Resources NetMechanic Home Looking For Help? Partner Programs Privacy Policy Contact Us Press Room
NetMechanic Home LOGIN | HELP | ABOUT US | PRODUCTS | SITE MAP
NetMechanic Menu
Over 52 Million Web Pages Tested!     
 

Search for:


Your Email:

I would like to receive my newsletter in:
HTML format
Text format



Volume 8 (2005)
   September
   June
   April
   March
   January

Volume 7 (2004)
   November
   September
   July
   June
   May
   April
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 6 (2003)
   December
   November (Part 2)
   November
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 5 (2002)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 4 (2001)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 3 (2000)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June
   May
   April
   March
   February
   January

Volume 2 (1999)
   December
   November
   October
   September
   July
   June
   May
   April
   March
   February
   January

Volume 1 (1998)
   December
   November
   October
   September

 

JavaScript Tip:
Encourage Repeat Visitors

by Larisa Thomason,
Senior Web Analyst,
NetMechanic, Inc.

  
January 2001
Vol. 4, No. 1
 • Hosting Tip
 • JavaScript Tip
 • Tool Tip
  

Click here to bookmark this story!

Keep visitors coming back to your Web site by adding a bookmark link with this simple JavaScript. Visitors browsing with Internet Explorer can add your Web page to their Favorites section with just one click. Try this easy technique to encourage repeat visits to your site.

Where Did I See That Site?

Unless you're CNN or Microsoft or NetMechanic, few visitors will find you just by entering your URL address into their browser. Most will locate your site using search engines or directories or by following a link from another site.

But that method introduces a lot of variables: search engine rank can change, other sites may drop your link, or visitors may not remember what keywords they used to find you. Haven't you ever searched in vain for a particular site you found, but couldn't remember exactly how you got there?

Don't leave it to chance - or a good memory. Instead, remind visitors to bookmark your site while they're reading your content.

Set Up The JavaScript Function

This simple JavaScript code will work in Internet Explorer.

Place this section inside the <HEAD> section of your page:

In this script, you're declaring two variables and using them in a function.

  • The first variable, urlAddress, is the address of your Web page.
  • The second, pageName, is the descriptive text that you want visitors to see when they refer to their Favorites list.
  • Netscape Navigator doesn't support the window.external property, so we check first to see if the visitor is using a browser that does. If their browser doesn't support the function, they see an alert box instead.
  • The function, addToFavorites, tells the browser to save both variables so the visitor can add the information to their Favorites section.
  • Remember to replace the variable names with your own page URL and description.

Use The Function In The BODY Section

Once you have your function set up, you can refer to it anywhere in the <BODY> section of your document. The most obvious place to put it is a few lines before the content of your document.

We used one at the top of this page with a text link using this code:

Reference the function inside a form to get a different look:

That code appears on your page like this:

Bookmark this page!    

A casual visitor doing online research may find your site interesting once, but can they find it again? Use the automatic bookmark script to keep interested visitors coming back for more.



Rate This Tip:
Not Useful Useful Very Useful   
 
NetMechanic Tools
HTML Toolbox
Browser Photo
Server Check
Search Engine Starter
Search Engine Tools
GIFBot
Newsletter
HTML Tutorial and Tips
Search Engine Tutorial
Accessibility Information
Browser Problem Tutorial

Company Info
Products
About Us
Contact
Advertise
Link To Us
Jobs
Privacy Policy
Partner Programs
Press Room
RSS Feed
Support
 



Powered by Overture!

 
     
 
   
 
     


Keynote Home
Copyright © 1996-2007,
Keynote NetMechanic
All rights reserved.