Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can JavaScript be used to personalize or tailor a Web site to fit individual user
#1
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.






Hair Building Fiber
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  What is called as negative infinity in JavaScript? sulbha 5 23 05-15-2017, 07:06 PM
Last Post: sin123
  How to Open Popup using javascript tonnygrand 2 65 01-17-2017, 01:33 AM
Last Post: ITSGOLIVE
  Client-side JavaScript being.chinmay 0 46 09-19-2016, 09:34 PM
Last Post: being.chinmay
  MAKE YOUR HOUSTON WEB DESIGN MORE USER-FRIENDLY Nasreen Langa 0 62 08-17-2016, 12:29 AM
Last Post: Nasreen Langa
  what is bind() method in javascript? Brianvoges 3 186 03-14-2016, 12:11 AM
Last Post: har.sinha
  What can javascript programs do? being.chinmay 0 69 02-08-2016, 10:13 PM
Last Post: being.chinmay
  Using PHP variables with JavaScript being.chinmay 0 68 12-28-2015, 09:32 PM
Last Post: being.chinmay

Forum Jump:


Users browsing this thread: 1 Guest(s)