|
INTERVIEW QUESTIONS
WEB
JAVA SCRIPT
DETAILS
Question: How can JavaScript be used to personalize or tailor a Web site to fit individual users?
Answer: 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.
|
|
|
Category |
Java Script Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8330 users |
Added on |
9/21/2014 |
Views |
67789 |
Rate it! |
|
|
Question:
How can JavaScript be used to personalize or tailor a Web site to fit individual users?
Answer:
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. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Explain about the Boolean functions present in Javascript?
|
View Answer
|
|
Explain about strings in JavaScript?
|
View Answer
|
|
Explain about defining numbers in Java Script?
|
View Answer
|
|
Explain about arrays in Java Script?
|
View Answer
|
|
Explain about Cross site scripting?
|
View Answer
|
|
What are the rare cases when Java Script will not function?
|
View Answer
|
|
What are the precautions taken by the web browsers to contain malicious activity with Java Script?
|
View Answer
|
|
Explain about the security functions presents in JavaScript?
|
View Answer
|
|
What is a JavaScript engine?
|
View Answer
|
|
State some simple usages with Javascript?
|
View Answer
|
|
Explain about Variadic functions?
|
View Answer
|
|
Explain about run time environment of Javascript?
|
View Answer
|
|
Explain functions as methods?
|
View Answer
|
|
Explain functions as object constructors?
|
View Answer
|
|
Explain about inner functions and closures present in Function level programming?
|
View Answer
|
|
Explain about the structured programming features of Java Script?
|
View Answer
|
|
Explain in brief about Java script?
|
View Answer
|
|
How to create a function using function constructor?
|
View Answer
|
|
What does the delete operator do?
|
View Answer
|
|
How to test for bad numbers using JavaScript?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Java Script Interview Questions & Answers - Exam Mode /
Learning Mode
|