Static contents : The contents of the Web page which do not change frequently irrespective of user who is requesting or the time at which request has been sent.
Working of the Web Application (Static Contents): The user send the request by typing the specific URL in the client browser. The DNS server resolves the URL to the IP address and return’s it to requesting browser. The browser then send the request to the Server with IP address as obtained above The Web Server will be listening in to the requests at Port No 80 The browser connects to Port No 80 of the specified Server Since the user is requesting for the static contents, Web server retrieve a file (normally html) and sends it to the requesting client browser as a response. The client has to wait till the response has not been received.
Dynamic Contents : The contents of the web page which changes frequently, based upon the user (user ID and password) who is requesting, or time or due to various other factors. E.g. : Email account, Stock market web site.
Working of the Web Application (Dynamic Contents): User send the request to the server. DNS server resolves the URL and sends the IP address to the browser. Browser then forwards the request to the Server with above obtained IP address. Server runs the program (e.g. : Servlet/JSP) to generate the dynamic response Server sends the response to the requesting browser At the client’s browser, entire page gets refreshed with the response page The user has to wait till the page is not loaded in its entirety.