有没有任何工具可以帮助缩短网站的加载时间?
我网站上的某些页面需要一段时间才能加载。我想知道是否有任何免费工具可以帮助我加快/改进代码。我用谷歌搜索了一下,但我想从专家那里找到她。
编辑:我正在使用 PHP、MySQL、jQuery 等。
Some pages on my site take a while to load. I was wondering if there were any free tools that could help me speed up/improve the code. I've googled a bit but I wanna her from the experts.
EDIT: I'm using PHP, MySQL, jQuery, etc.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
第一步是了解站点性能的两个方面 - 后端(服务器和数据库相关)和前端(浏览器/缓存相关)。优化动态网站的数据库速度、服务器速度等本身几乎是一门完整的学科。
优化前端(浏览器从服务器请求页面及其元素)是网站 80% 的大多数“速度”问题所在,因此这就是我将重点关注的内容。
第一步是确定速度问题发生的位置。有几种在线工具可以帮助完成该部分:
通常可以通过内容的组合/缩小/压缩获得最大的收益,而使您能够做到这一点的更好工具之一是 缩小项目(需要 PHP)。
这应该给你足够的开始,直到你回来提供细节。
The first step is to understand there are two aspects of site performance - back-end (server & database related) and front-end (browser/caching related). Optimizing a dynamic website for database speed, server speed and so-on is almost a entire discipline itself.
Optimizing for the front-end, where the browser requests the page and it's elements from the server is where 80% of most "speed" issues with websites lie, so that's what I'll focus on.
The first step is to identify where your speed issues occur. There's several online tools that can help with that part:
The biggest gains can normally made around combining/minification/compression of your content, and one of the better tools that enable you to do that is the Minify project (requires PHP).
That should give you enough to start with until you come back with specifics.
这取决于您使用什么来编码您的网站。它还可能取决于您使用的服务器。您是否与数据库进行大量交互?如果是这样,那么也许研究 PHP 优化可以更好地帮助您。如果没有,请查看您的网站,我建议尽可能减少图像。图片尺寸巨大,可能需要很长时间才能加载;因此,如果您知道您的网站上有一些可以用代码执行的操作...那么就用代码执行,尽可能跳过图像。
It depends on what your using for the coding of your website. It also may depend on the server your using. Are you doing much interaction with a database? If so, then maybe researching PHP optimization could help you better. If not, look at your website and I'd suggest cutting down on images as much as possible. Images are huge in size and can take ages to load; so if you know there's something on your website that you could do in code... then do it in code, skip out on images whenever possible.