Home > Web Front-end > JS Tutorial > Use javascript code to determine whether a web page is static or pseudo-static_javascript skills

Use javascript code to determine whether a web page is static or pseudo-static_javascript skills

WBOY
Release: 2016-05-16 16:50:02
Original
961 people have browsed it

I have been studying Dedecms recently. Before I was planning to build a website, I had been thinking about whether to use pseudo-static. I haven't decided yet. After much deliberation, the best way is to take a look at whether websites of the same type use static or pseudo-static. So when we open a website and lack basic knowledge, how can we easily and quickly determine whether the webpage is static or pseudo-static? Let me give you a brief introduction below:

Pseudo-static and static are difficult to distinguish from the URL alone. Generally, the suffix of web pages ends 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 target web page, in the address Enter javascript:alert(document.lastModified) in the field to view the last updated time of the webpage:

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

If the web page uses pseudo-static, the date and time are exactly the same as our computer’s system time, accurate to the second.

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 uses pseudo-static.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template