SoFunction
Updated on 2025-02-28

Use javascript code to determine whether a web page is static or pseudostatic

I have been studying Dedecms recently. Before I was preparing to build a website, I have been thinking about whether to use pseudostatic or not. I haven't decided yet. After thinking about it, the best way is to see whether the same type of website uses static or pseudostatic. So when we open a website, how can we simply and quickly determine whether this web page is static or pseudostatic when there is insufficient basic knowledge? Let me give you a brief introduction:

From the URL, it is difficult to distinguish between pseudostatic and static singles. Generally, web page suffixes end with .html. We can use a simple javascript code to judge:

First of all, this javascript code can only be opened in IE, and cannot be tested with Chrome and Firefox.

After we open the landing page, enter javascript:alert() in the address bar to view the last update time of the web page:

If the web page is static, the date and time are different from the system time of our computer.

If the web page is pseudo-static, the date and time are exactly the same as the system time of our computer, and are accurate to seconds.

Do a test on my homepage. After opening it, it is exactly the same as my current computer system time. It can be simply judged that the webpage is pseudo-static.