Difference Between Static Site and Dynamic site?

Friend can anyone tell me exact mean of these two : Static Site and Dynamic site , i know about these two lit bit but want to know more about it

In a nutshell the difference is that static websites dont allow any interaction with the user. While dynamic websites inlcude some sort of code (php for example) that allows the user to interact with the website. Be it with contact forums, polls, newsletters, forums, custom search results, article submission etc.

In static websites, pages are created by having all it content in its code. In dynamic sites, all or some part of the site is fetched and show dynamically from database.

A dynamic site is one where, among other things, you can search for topics that have already been discussed:

Static Websites
> A static site is a website that is written entirely using HTML. Each web page is a separate document and there are no databases or external files that are drawn upon.

Dynamic Websites
> A dynamic website is written using more complex code — such as PHP or ASP — and has a greater degree of functionality. For instance, many dynamic websites can be controlled by a content management system. This means that you will potentially be able to make updates without needing any knowledge of HTML or any website software.

OK, there’s no point in just copying answers that already exist elsewhere, so let’s consider this answered.


a dynamic site is automated. A static site is not.

For example.
In a static site, let say a portfolio site, portfolio you could have 10 pages; each page representing a piece in your portfolio.
you would need 10 HTML documents, any time you change something you would need to go to THAT specific document and make alteration to the HTML and re upload. If you needed to change something that was present in the whole site you would need to alter all 10 documents, making sire their relationships stays intact. Fun!

The same site, done dynamically may have as little as ONE php/asp TEMPLATE PAGE. The template page would read a variable thsi could be part of the URL, or passed via GET/POST methods, which it would use to call data (your content) off a database. It would then flow the data into the template which would DYNAMICALLY output as HTML and be served to the user. When you update a dynamic page ( usually) you update the database and not the template, all content and relationships are automatically updated.