Forum Moderators: mack

Message Too Old, No Replies

Static vs. Dynamic pages

What are they? Which is better?

         

Eljaybe

4:27 pm on Feb 26, 2004 (gmt 0)

10+ Year Member



I searched this site to find the answer, but I couldn't find a simple explanation. So I hope I'm not repeating a question already asked. Can anyone give a brief definition of a static web page vs. a dynamic page?
Is one better than the other?

HelenDev

4:46 pm on Feb 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can have a go ;)

Static pages are normally just plain html, and don't change depending on user input.

Dynamic pages usually employ some sort of script (either server-side like php or client-side like javascript).

I think Dynamic often refers to pages which have been generated from a database which would use server-side scripting.

Pages which use javascript could also be described as dynamic, as they can change once the page has loaded, and respond to users entering data or clicking buttons.

Is one better than the other?

I think it depends what you want to achieve. Database generated pages are great for e-commerce type sites where you can change the content without having to keep fiddling with the HTML pages every time.

Hope this is helpful.

Helen.

Dreamquick

6:15 pm on Feb 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dynamic pages usually employ some sort of script (either server-side like php or client-side like javascript).

I think Dynamic often refers to pages which have been generated from a database which would use server-side scripting.

Pages which use javascript could also be described as dynamic, as they can change once the page has loaded, and respond to users entering data or clicking buttons.

Good answer... just to clarify;

Dynamic pages refer to any use of the technology - whether it's in a high-end database-driven applications or just being used for pure static pages or even a static HTML alternative (to take advantage of includes for example).

Javascript pages aren't true dynamic pages in the same sense as say PHP etc. because they are running on the client-side rather than the server-side and so you lose a few of the benefits of server-side code. Also technically speaking any sort of client-side scripts which modifies the page at run-time falls under the heading of DHTML (Dynamic HTML) rather than dynamic pages.

Finally it's also worth noting that if they are used in a certain ways you can't tell dynamic pages apart from static pages, so you get all the benefits of appearing to be static as well as the benefits of being dynamic.

- Tony

Eljaybe

3:04 pm on Mar 4, 2004 (gmt 0)

10+ Year Member



Thank you very much for the info. I think I have a better understanding now.