Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How can JavaScript be used to personalize or tailor a Web site to fit
How can JavaScript be used to personalize or tailor a Web site to fit individual users?
✍: Guest
JavaScript allows a Web page to perform "if-then" kinds of decisions based on browser version, operating system, user input, and, in more recent browsers, details about the screen size in which the browser is running. While a server CGI program can make some of those same kinds of decisions, not everyone has access to or the expertise to create CGI programs. For example, an experienced CGI programmer can examine information about the browser whenever a request for a page is made; thus a server so equipped might serve up one page for Navigator users and a different page for Internet Explorer users. Beyond browser and operating system version, a CGI program can't know more about the environment. But a JavaScript-enhanced page can instruct the browser to render only certain content based on the browser, operating system, and even the screen size.
Scripting can even go further if the page author desires. For example, the author may include a preference screen that lets the user determine the desired background and text color combination. A script can save this information on the client in a well-regulated local file called a cookie. The next time the user comes to the site, scripts in its pages look to the cookie info and render the page in the color combination selected previously. The server is none the wiser, nor does it have to store any visitor-specific information.
2008-06-03, 5625👍, 0💬
Popular Posts:
Is There Any XSD File to Validate Atom Feed Files? - RSS FAQs - Atom Feed Introduction and File Gene...
The following variable is available in file1.c, who can access it? static int average; Answer: all t...
How do you target a specific frame from a hyperlink? Include the name of the frame in the target att...
What is a delegate ? Delegate is a class that can hold a reference to a method or a function. Delega...
How To Give a User Read-Only Access to a Database? - MySQL FAQs - Managing User Accounts and Access ...