Dynamic Content
4/3/26Less than 1 minute
Dynamic Content
Motivation
Client-side and server-side
Common Gateway Interface (CGI)
Idea: When dynamic content is requested, the web server runs an external program that produces the web page
â– Program is often written in a scripting language ('CGI script')
â– Perl is among the most popular choices
Drawbacks of CGI
- Each invocation creates a new processs
Routes
- Suppose our web application has many different URLs
- ■Example: Login page, user home page, account page, settings page, …
- â– How do we associate the corresponding code with the URLs?
- ■Idea: Sequence of ‘if’ statements, as shown above. Is this a good idea?
