优化PHP

WBOY
Release: 2016-06-23 13:32:28
Original
886 people have browsed it

推荐Nginx做前端Apache做后端。另外加个PHP加速器。带宽如果足够应该很快了。当然CPU和内存也要足够。如果经常占满就升级下配置吧。前端网页尽量简洁。简洁是加载速度的基础保证。设置静态内容缓存时间-变化很少的静态资源可以设置客户端缓存时间,减少请求。开启Gzip压缩,可减少页面加载时间.合理使用cookie-cookie越小越好,而且对于静态文件需要避免设置cookie.合并CSS和JS文件-分别合并相同域名下的JS文件和CSS文件可减少请求数,图片优化-网站上的图片压缩了在上传。还有最近抽风的谷歌字体不要用。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template