Static webpages vs. dynamic webpages

Programming, for all ages and all languages.
Post Reply
Kon-Tiki

Static webpages vs. dynamic webpages

Post by Kon-Tiki »

I've heard 'bout those, but dunno what the difference is, how to have your site be one or the other, what are the pros and cons of each one. That's why I'm asking it here.
What's the difference between static and dynamic webpages, how can you have your site be one or the other and what are the pros and cons of each one?
ark

Re:Static webpages vs. dynamic webpages

Post by ark »

A static webpage downloads and that's it. The content is fixed. A dynamic webpage changes based on the user's actions. There are varying degrees of dynamic-ness. Technically, a webpage with mouseover images is a "dynamic" web page.

Another example might be an FAQ page that hides the answers to questions until the question is clicked, and then hides the answers again at the user's request.

There are various ways of achieving dynamic webpages. Some pages use plug-ins like the Flash or Shockwave players from Macromedia. You can also use Java applets or just regular HTML with JavaScript (without the space -- why does the message board put a space there?). See the Online Forms topic in this board. I'd link to it but I'm too lazy right now.
Kon-Tiki

Re:Static webpages vs. dynamic webpages

Post by Kon-Tiki »

Alrighty, I'll check that thread :)
Eero Ränik

Re:Static webpages vs. dynamic webpages

Post by Eero Ränik »

The other way to make a difference between those two, is that static are pages written in HTML, which will stay the same, and dynamic pages are for example PHP or CGI scripts.
ark

Re:Static webpages vs. dynamic webpages

Post by ark »

Pages written in HTML can still be dynamic. You just have to attach a little scripting to them.

In fact, I would say that CGI pages are static. Probably the real difference between the two is that static webpages change on the server side and dynamic webpages change on the client side. CGI pages are often (always?) dynamically generated, but they are not what I would call dynamic webpages, although they are more dynamic than plain old HTML without scripting.
Eero Ränik

Re:Static webpages vs. dynamic webpages

Post by Eero Ränik »

That's just another way to make the difference between the words. Both are correct, but using them together in the same sentence is not since it's confusing. :P
dfgbdfbg

Re:Static webpages vs. dynamic webpages

Post by dfgbdfbg »

once epson.com was a site you could not bookmark to!
guess it was not static for one ..
ark

Re:Static webpages vs. dynamic webpages

Post by ark »

I don't know anything about that, but since a bookmark is basically just saving the text of a webpage's URL, the only way you wouldn't be able to bookmark a page is if it used some horrible redirection technique so that the URL of the home page changed every time you visited the page and so that the browser saw that URL as the one it should use instead of the proper home URL.

It's entirely possible, however, that bookmarking a CGI or PHP page wouldn't work properly, if the page required parameters that were only valid at the time that you bookmarked them -- a session ID, for example, might only be valid for a certain period of time and then expire.
Post Reply