Thursday, 28 April 2016

Static Versus Dynamic Web Pages

Web pages could be either static or dynamic. "Static" page will have constant content, while "dynamic" page has content changing. Therefore, static Web pages contain the same content each time the page is loaded, while the content of dynamic Web pages can be generated on fly.

Example for Static web pages are HTML pages, which defines the structure and content of the Web page. Every time an HTML page is loaded, it looks the same. The only way the content of an HTML page will change is if the Web developer updates and publishes the new file.

On the other hand some of the dynamic web pages are PHP, ASP, and JSP pages, these pages contain "server-side" code, which allows the server to generate dynamic content each time the page is loaded.
For example, the server may display the current time and date on the Web page. Also, dynamic pages use server-side code to access DB, which enables the page's content to be generated dynamically from information stored in the database. 

We can easily say whether the page is dynamic or static just by looking at the page's file extension in the URL, in the Web browser. If it is ".htm" or ".html," the page is probably static. If the extension is ".php," ".asp," or ".jsp," the page is most likely dynamic. 

Java Class file format