相当于“Google Closure Compiler”对于 HTML?

发布于 2024-08-10 07:20:16 字数 134 浏览 4 评论 0原文

是否有相当于 Google 的 Closure Compiler 的 HTML 最小化工具?

Is there an equivalent of Google's Closure Compiler for HTML minimizing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

泅渡 2024-08-17 07:20:16

我猜你指的是 Closure 编译器,它可以有效地压缩 javascript。如果您在谷歌中搜索“HTML 压缩器”,您会发现很多可以满足个人需求的选项。

I presume you mean the Closure compiler, which effectively compresses javascript. If you search the goog for "HTML Compressor", you will find a lot of options catering to individual needs.

北音执念 2024-08-17 07:20:16

考虑 HTML Tidy:

http://infohound.net/tidy/

这是一个免费工具,效果很好。

Consider HTML Tidy:

http://infohound.net/tidy/

It's a free tool that does a great job.

那一片橙海, 2024-08-17 07:20:16

我认为你可以尝试谷歌的mod_pagespeed,这将缩小响应内容。

I think you can try google's mod_pagespeed, which will minify the response content.

奈何桥上唱咆哮 2024-08-17 07:20:16

我写了一个python脚本,替换了pushlish中的所有id和类名。该脚本为每个类名和 id 生成唯一的标记,并在 javascript、css 和 html 模板文件中替换它们。对我来说效果很好

I write a python script, replace all id and class name at pushlish. The script generate unique token for each class name and id, relpace the in both javascript,css and html template file. It workds greate for me

提笔书几行 2024-08-17 07:20:16

我正在使用 Minify 在运行时修剪和压缩 html。唯一的要求和设置是您将 Minify 放在您的服务器上,并在前面添加以下代码页面。

<?php require $_SERVER['DOCUMENT_ROOT'] . '/min/pageBuffer.php'; ?>
<!-- html -->

I am using Minify to trim and compress the html at runtime. The only requirements and setup are that you put Minify on your server and prepend the following code to the page.

<?php require $_SERVER['DOCUMENT_ROOT'] . '/min/pageBuffer.php'; ?>
<!-- html -->
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文