Static resource version number batch generator.

The server sets long cache for static resources (expires 7d), which is fast but comes at the cost of: You updated CSS or JS, but users’ browsers are still using the old versions.. The symptom is “I clearly made the change, but nothing changed online.” The only cure is adding version stamps to references, andOne change, one upgrade. Paste the HTML in and add all tags at once.

Free · No login required Local computation · Content is not uploaded Corresponding incident · Fell into the same pit three times.

1Paste HTML

2Version settings

Recommended version stamp format: YYYYMMDD + sequential letter: first revision today a, and if modified again on the same day, b。

ResultProcessing statistics

OutputHTML with version numbers added.

0 lines
—

ManifestResources used by this page.

We’ve fallen into this pitfall

1 · Stepping into the same pit three times in a row.The first CSS change doesn’t appear online; neither does the second; and even the third change to the JS navigation fails to appear. The root cause is the same: nginx sets long caching for static assets. expires 7d, while the page references lack version numbers.

2 · The rule is simple, but must be written into the process.Long caching requires version stamps; increment the version number each time a resource changes.It is now a fixed action in our release checklist.

3 · Backend pages work in reverse.Backend/data pages must. Cache-Control: no-store, do not apply long cache; otherwise, changes in the admin panel also require a 7-day wait.

4 · Don’t modify just one page.The same CSS is referenced by 9 pages; modifying only some of them causes the strange phenomenon where “some pages are new while others are old.”