The advantages and disadvantages of generating static HTML for websites

高洛峰
Release: 2016-12-19 09:33:26
Original
1208 people have browsed it

In fact, the website has enabled pseudo-static, which is no different from generating static URLs. Why do we still need to generate static URLs?

Some webmasters like to generate static. Websites need to be static, blogs need to be static, and some even want to generate static for Discuz. Some people have been looking for WordPress plug-ins that can completely generate static. Is generating static really necessary?

 In fact, many foreign websites do not generate static, or even do not have the function of generating static at all. Some well-known foreign CMS and blog programs do not have the function of generating static. Why is static generation popular in China? In fact, N years ago, domestic servers generally had low configurations. Most websites were only placed on one server. There were not as many cloud services as there are now. Domestic network speeds were not strong. They could only rely on static generation to "accelerate" CMS. Whether or not the static generation function is available has become the basis for some webmasters to judge the quality of a CMS. Many CMS developers actually understand that static generation is not necessary, but they still have to have this function.

Nowadays, the Internet speed of domestic netizens has been greatly improved, and the server configuration is getting higher and higher. In fact, we can completely use pseudo-static. With the caching function of dynamic programs, the access speed can be almost the same as the speed of generating static.

Let’s briefly talk about the advantages and disadvantages of static generation:

Advantages:

★ Fast access speed

Disadvantages:

★ The website must be regenerated every time the template is modified

★ It takes a long time to generate a large number of files

★ Some low-configuration servers may cause server downtime when generating static

★ Generating a large number of files takes up a lot of hard disk space

★ Unable to implement some special functions (such as displaying random articles, but not wanting to use JS calls)

The Internet is developing very fast, we You have to follow the pace! The above is the experience of Huoduan Network in website construction for many years. It does not mean that all websites are not suitable for static generation. I just want to guide some webmasters not to pursue the static generation function too much.


For more related articles on the advantages and disadvantages of generating static HTML for websites, please pay attention to the PHP Chinese website!


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