简体   繁体   English

为什么PHP会减慢页面加载速度?

[英]Why is PHP slowing down my page load?

Here is my code: 这是我的代码:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>title</title>
    </head>
    <body>
    content
    </body>
</html>

As an .html file, it loads in 16ms. 作为.html文件,它将在16ms内加载。 As a php file, it loads in 5s. 作为php文件,它会在5s内加载。 Actually, in DevTools it loads much faster, but the throbber keeps spinning for 4.x seconds and then the load time changes to 5.x seconds. 实际上,在DevTools中,它的加载速度要快得多,但是动子保持旋转4.x秒,然后加载时间更改为5.x秒。 It seems to be a php issue, but what is going on? 似乎是php问题,但是怎么回事? What should I check? 我应该检查什么? It is a blocker, because the real page has an accordion that will not become clickable until the browser releases! 这是一个阻止程序,因为实际页面中的手风琴只有在浏览器释放后才能被单击!

Please use Google PageSpeed Tools. 请使用Google PageSpeed工具。 It will analyze your page to find what's slowing down your page. 它将分析您的页面,以找出使您的页面变慢的原因。 You may try Yslow Tools too (browser addon) 您也可以尝试使用Yslow Tools(浏览器插件)

Page Speed Tools 页面速度工具

yslow.org yslow.org

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM