通过删除代码注释来优化网站? [英] Optimize websites by removing code comments?

查看:85
本文介绍了通过删除代码注释来优化网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道从.php,.js,.css,.html和类似文件中删除代码注释时,性能是否有(显着)改善?

I wonder if there is any (noticeable) performance improvement when removing code comments from .php, .js, .css, .html, and similar files?

推荐答案

大多数情况下,现代CPU的速度非常快...最显着的改进是下载速度的提高.删除发送到浏览器的所有不必要的注释,最小化CSS,JavaScript文件,使用CDN等等.

Mostly not, modern CPU's are very fast... The most notable improvement is the speed in the download speeds. Strip out any unnecessary comments sent down the wire to the browser, minify CSS, JavaScript files, use CDN's etc.

这篇关于通过删除代码注释来优化网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆