ASP's objects and components give you ways to personalize your Web site for individual users.
You may have seen these in Web sites you visit:
Greetings and other user name usage
You can greet a registered or returning user with a "Welcome, [user name]!" on the opening page by storing the user's name in a browser cookie or a database record. By storing this name as a session variable, you can personalize pages throughout a user's visit.
Personalization can be a nice touch on an order page or in a thank you confirmation. Again, user data in a session variable is available for all Web pages and ASP scripts to access and can easily be inserted into the HTML code of the order page heading or confirmation form.
User-selectable site navigation and layout
Different users have different navigational needs. For example, your site may use both novice and expert navigation. You can let users select (through a form) the level of navigation they are ready for.
Some browsers of users may not support frames; others may simply prefer not to use frames to view the Web site. Third-party components can work with ASP scripts to report browser capabilities during the initial browser-server exchange,
and the user could select whether to view a site with or without frames and store the setting of choice for future visits to the site.
Preference-based content and special offers
Some users may use our T-shirt site to purchase only celebrity T-shirts, while others may want only sports team shirts.
By retaining users' content preferences, through a behind the scenes redirect, repeat visitors are automatically sent to the parts of our site that match their interests.
Cookies versus databases
Cookies stored on the user's browser can identify frequent visitors or users who have made purchases above a target amount or within a time period.
When these users log in, they can be directed to an ASP page with a special discount or bonus item and an identifying code for the order form.
However, as discussed previously, when user personalization data increases, cookies and other methods that pass data back and forth become more complex.
The database techniques discussed later in the course can be used instead to maintain a table of users' preferences and special offer qualifications.
The next lesson describes the Advertisement Rotator component.