网站停机,“状态”:200错误?

时间:2013-11-10 00:35:04

标签: php jquery http-status-codes

在index.php页面上,我正在使用jQuery重定向,以便将较小屏幕上的用户发送到移动登录页面。我正在使用.php扩展名,所以它将被读取为FIRST。网站所有者通过电子邮件向我发送了一个屏幕截图,说“网站已关闭,收到此错误”

屏幕截图显示: { “状态”:200, “exec_time”:8.34300000000000001e-06}

但后来他给我发了电子邮件说“没关系,我刚刚重启了Chrome,现在没关系”我不知道那是什么意思。任何见解都将不胜感激。

这是我的代码:

<!DCOTYPE html>
<head>
<title>title</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<link rel="shortcut icon" href="/favicon.ico"> 
<link rel="icon" type="image/ico" href="/favicon.ico">
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
    if ( (screen.width <= 600) ) { 
        window.location = '/mobile.html';
    }
    else if ( (screen.width > 600) ) { 
        window.location = '/index.shtml';
    }
});
</script>
</head>
<body>
<p>If you're not automatically redirected, please choose:</p>
<p><a href="mobile.html" target="_self" title="Mobile Login Page">Mobile Login Page</a></p>
<p><a href="index.shtml" target="_self" title="Desktop Login Page">Desktop Home Page</a></p>
<p>&nbsp;</p>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

{"status":200,"exec_time":8.34300000000000001e-06}

状态200:确定 - 这表示服务器接受并处理了您的请求而没有错误

exec_time:脚本执行相关功能可能需要多长时间。

第一眼和第二眼我仍然没有看到发布的代码有任何明显的问题。 在任何情况下,它可能是chrome只是在特定的本地安装上打嗝并且无法正确呈现页面,即使它成功发送请求并收到了良好的标题响应。

无论哪种方式,服务器都会产生一个好的标题,所以除非您在相关日志中找到某些东西(或发布)证明您的服务器状态,否则将其视为服务器错误或网站出现故障的情况可能并不谨慎。 ”。