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, 5705👍, 0💬
Popular Posts:
.NET INTERVIEW QUESTIONS - What are types of compatibility in VB6? There are three possible project ...
What is normalization? What are different types of normalization? It is set of rules that have been ...
.NET INTERVIEW QUESTIONS - What is the difference between thread and process? A thread is a path of ...
What Happens to Your Transactions When ERROR 1213 Occurred? - MySQL FAQs - Transaction Management: C...
Can we get a strongly typed resource class rather than using resource manager? In the previous quest...