A URL-Redirection Program
Let’s look at a simple program of a type that’s used on lots of Web sites. Many sites provide pull-down menus as navigational aids. When you select an option from the menu, the browser automatically redirects you to the link that you selected. This functionality is implemented using JavaScript. In many cases, there’s also a submit button associated with the field that users whose browsers support JavaScript can use to navigate using the menu. When a user clicks on the submit button, the link he chose is submitted to a CGI script, which then redirects the user to the appropriate page.
In this example, there is no intermediate processing step between processing the user input and generating the appropriate output. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access