How to detect whether a website is dynamic or static

It depends on the webpage’s URL extension, which is found in the address field of the web browser.

The page is static if the URL extension is htm or html. If the URL extension is php, asp, or jsp, the page is dynamic.

If there is no extensions?

1 Like

Again, a PHP page can have no PHP code in it, be exactly the same as that HTML page i posted in #18. Just because it has the extension doesn’t mean its doing anything dynamic. PHP will happily serve that page to the web server for transmission to the user.

This is why I called it a massive grey area :wink:

1 Like

A Short answer is Not really. You need to check case by case and though you cannot be sure 100% that a website is dynamic or static. Nowadays websites are using more Jquery and Ajax.

Static Vs Dynamic:

Static websites: Websites contain fixed pages and formats. It displays the exact same information whenever anyone visits it.

Dynamic websites: Website can change the web page contents dynamically based on the client’s browser.

You can also use a browser extension or addon to check the site is static or dynamic:

Is there an accepted standard definition of static and dynamic websites? I know of none. It is a matter of opinion. If however matthewjohn938 can provide a clear definition then the question could ask about those specifics.

The question is asking how to detect … dynamic or static. Detecting that JavaScript is downloading exactly the same data would require a program to parse and understand the JavaScript.

The question is asking how to do that.

1 Like

You are absolutely wrong.

I don’t get the point of the OP. What does it even matter if it is not your site?

Care to elaborate?

Not saying I disagree, but just saying somebody is wrong without saying why doesn’t help the discussion along as it raises more questions than it answers.

2 Likes

I agree, and I feel that the real solution lies not in defining what a dynamic page is or how to identify one, but in identifying exactly what you are trying to achieve - and possibly - why?

Perhaps if you share with us more someone can help you more effectively.

1 Like

Agreed. It also occurs to me that a PHP page could have PHP code that simply echoes fixed text or always displays the same information and layout - I would consider that ‘static’. If you want to push it, in a way, CSS makes a page dynamic, enabling it to be responsive or adapt to different browsers. It really depends on what the OP is actually trying to achieve. Perhaps an example would help ?

Please provide your definition of ‘static’ and ‘dynamic’ so we can assist further with answers more specific to your needs.

An interesting discussion. However, I believe the topic is utterly spurious. The OP has not been seen for 2 days and, I suspect, has no interest in the discussion. Of course, he may yet prove me wrong.

5 Likes

Not true. You can parse files with .htm/.html extension as php, hide extension (or create file without any extension) to make it look like a dynamic page or create pure html pages with .php extension.

https://httpd.apache.org/docs/2.4/mod/mod_mime.html#addtype

https://httpd.apache.org/docs/2.4/mod/core.html#forcetype

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.