惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
TaoSecurity Blog
TaoSecurity Blog
T
Threat Research - Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
GbyAI
GbyAI
Microsoft Security Blog
Microsoft Security Blog
N
Netflix TechBlog - Medium
AWS News Blog
AWS News Blog
Security Latest
Security Latest
L
LINUX DO - 热门话题
Blog — PlanetScale
Blog — PlanetScale
T
Threatpost
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
S
Securelist
I
Intezer
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Heimdal Security Blog
T
The Exploit Database - CXSecurity.com
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Hackread – Cybersecurity News, Data Breaches, AI and More
U
Unit 42
The Register - Security
The Register - Security
NISL@THU
NISL@THU
S
Schneier on Security
M
MIT News - Artificial intelligence
The Last Watchdog
The Last Watchdog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Y
Y Combinator Blog
Know Your Adversary
Know Your Adversary
罗磊的独立博客
MongoDB | Blog
MongoDB | Blog
美团技术团队
W
WeLiveSecurity
P
Privacy International News Feed
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
小众软件
小众软件
博客园 - 【当耐特】
P
Proofpoint News Feed
P
Privacy & Cybersecurity Law Blog
T
Tor Project blog

James Guo’s Portfolio (@ZE3kr)

Hertz Rental Debt Collection and How I Sued the Debt Collector macOS on iPad? (with Jump Desktop) Vision Pro Initial Experience | ZE3kr The Downtime of Alibaba Cloud Hong Kong Region How Fast is mmWave 5G? 2000Mbps! See if Your iPhone Supports mmWave Magic Keyboard for iPad Pro Experience Self-built PowerDNS Advanced: GeoDNS, dnsdist, Lua Records SSD USB, Windows To Go and Mac WordPress 5.0 Update is Available, New Editor, New Theme Azure DNS, NS1, Constellix, Comparison of Three International GeoDNS Service Providers Recommendations for Some Exquisite and Useful Software on Mac Talk About Data Backup | ZE3kr Introduction to DNSSEC, How Signatures Work Cloudflare Argo And Railgun Comparison Test, The technology of CDN Acceleration Recommendations For Several Free Server Monitoring Services Comparison of Several Full-Site CDNs 2017, Another Look at SSL and HTTPS Some suggestions on website construction and service purchase Detailed Explanation of DNS Domain Name Resolution System - Basics Build Blazing Fast Mobile Pages With AMP Cloudflare's new feature experience - Load Balancing, Rate Limiting Back to WordPress' Built-In Comment System Implementing ECDSA/RSA Dual Certificate with Free Let's Encrypt How to configure for pure IPv6-Only network access Self-built PowerDNS GeoDNS Server | ZE3kr Install GitLab on Your Own Server Instead of GitHub! A Few WordPress Optimization Suggestions Comprehensive Comparison of DNS Services such as CloudXNS, Route 53, and Alibaba Cloud DNS Talk about the streaming of video on the Internet Canon Announces New APS-C Model EOS 80D, Powerful Video Recording, New Focus System and CMOS Several recommended plugins for WordPress Using Matomo with WordPress to Build a Powerful Statistics System TL-PA500 power cat, deploy wireless LAN cluster Why use a CDN service? HTTPS Everywhere is Coming | ZE3kr Withings Activité Pop smartwatch recommendation, sleep tracking, exercise recording, smart alarm clock DELL P2415Q 4K Monitor Recommended Use srcset + sizes attributes and w identifier to solve all responsive image problems Eyefi Mobi makes your camera Wi-Fi ready now Mobile First - Speed | ZE3kr MacID Lets iPhone Unlock Apple's Mac with Touch ID ProCamera – Recommended iPhone camera software Mobile First - Origins | ZE3kr
The pros and cons of static web pages
2016-01-03 · via James Guo’s Portfolio (@ZE3kr)

Static web pages, that is, pure HTML web pages, each page in the blog is a .html file. First of all, there is a misunderstanding here. Some people think that static web pages cannot be easily updated. In fact, static web pages can be easily updated. With the help of static web page generators, updating them is not complicated. When it needs to update an article, it needs to regenerate the home page and the article, which is usually done in less than a minute. What if the blog were to use dynamic web pages? It is certainly possible to do so, and there are many mature software, such as WordPress, that run in a PHP environment and require a MySQL database. Every time a web page is accessed, the server needs to read the content of the database (or read from the cache), and then process it into HTML with a certain style and return it to the user. Of course, dynamic web pages can realize all the functions of static web pages, and of course there are more functions, such as image uploading and regular publishing. Since dynamic web pages can realize all the functions of static web pages, what are the advantages of static web pages?

Advantage 1: Save Server Overhead, not Afraid of Attacks

Not Afraid of DDOS Attack

After a lot of DDOS attack tests, I found that static web pages are much harder to attack than dynamic web pages, even one to several orders of magnitude harder. Every time you visit a dynamic web page, you need to parse PHP, read the database or cache, and require much more computation than static web pages. Therefore, the DDOS attack is basically ineffective, and the speed is not even slow.

Hard to be Hacked

A static web page does not need a database at all, it is just a file itself, so there is no problem such as database injection at all. There are even fewer bugs.

Simple CDN on the Web

CDN on static web pages is extremely simple, and site-wide caching is enough. Every page can be cached directly, and all caches are cleared when the page is updated. After you have a CDN, you are not afraid of DDOS. It is not a problem to attack the other party or even GB, and people just need to pay a few cents for the traffic fee.

Advantage 2: Simple Server Deployment

A static web page doesn’t need a database at all, it just needs a server that can upload files and link externally, such as Amazon S3 can put it. Most servers can deploy it.

Advantage 3: Simple Maintenance

Basically, as long as you know HTML, CSS and JavaScript, you will write static web pages, and then use some static web page generators to generate all the pages directly.

Problem 1: Update Real-Time

If a static page generator is used, there must be a delay, and the amount of delay depends on the speed at which the page is generated. There are two generation methods to choose from, one is to generate locally, the other is to generate on the server.

These functions can generally only be implemented in dynamic web pages, because they all require a database. However, static web pages can choose third-party services. For example, you can use Disqus for comments, Google Analytics for statistics, or You can build your own dynamic server to do these things and install Piwik.

Summarize

There is no problem with blogging with static web pages, and it is also recommended by me (slap in the face, I have actually switched to WordPress now). It’s convenient and simple, and there’s nothing wrong with it.