远程调试一个网站? JSON与IE8问题 [英] Remote debug a site? JSON issue with IE8

查看:127
本文介绍了远程调试一个网站? JSON与IE8问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这种情况是,网站在所有机器上工作,除了客户工作的机器外。这是在非洲,我没有希望得到它。他的IT知识有限,我们对公司的网络政策知之甚少。

我知道他使用的IE8的doc模式也是8,我怀疑它是在7中运行的,因为一些CSS问题,但显然不是。

我使用JSON文件和Ajax查询来填充网站的重要部分。它适用于所有主要浏览器。我使用开发模式,并尝试IE7和IE8,它仍然有效。然而,他的机器没有加载任何东西,我输出消息到控制台,当他检查(通过屏幕转储确认)时,有空虚。

什么是爱,或者是从这里调试它的一种方法或手段,关于他的机器的全部细节,或者为什么json不能被读取的一些解释。



如果有人使用IE8,也许你可以看一看kingpetroleum.co.uk/conversion.php



<下拉式应该填充选定的表单网页。
感谢您的帮助。

编辑:在旧网站的索引页上有一个重定向。如果您检查出来,请使用/conversion.php

解决方案

正如评论中所提到的,您需要添加一个polyfill旧版浏览器不支持的JSON对象。请参阅 here 以获得关于JSON对象的浏览器兼容性的更多信息。他们提到它应该与IE8兼容,但事实并非总是如此,如果用户在兼容模式下运行IE8,它也无法工作。



在加载其他脚本之前,您应该包含polyfill脚本文件,我建议在条件注释中进行:

 < HEAD> 
<! - [if lte IE 8]>
< script src =/ path / to / json3.js>< / script>
<![endif] - >
< / head>

这只会为IE8及以下版本加载polyfill。


The scenario is that the website works wonderfully on all machines except the ones where the client works. It's in Africa and I've no hope of getting access to it. He has limited IT knowledge and we don't know a great deal about the companies net policies.

I know that he is using IE8 with the doc mode being 8 as well, I suspected it was running in 7 because of some CSS issues but apparently not.

I use a JSON file and Ajax query to populate an important part of the site. It works well in all main browsers. I've used Dev mode and tried IE7 and IE8 and it still works.

However, his machine doesn't load anything, I output messages into the console and when he checked (confirmed via screen dump) there was emptiness.

What is love is either a way or means of debugging it from here, full details about his machine or some explanation as to why the json can't be read.

If anyone is using IE8 perhaps you could have a peek- it's kingpetroleum.co.uk/conversion.php

The drop down should populate the form web selected. Thanks for any help.

Edit: there's a redirect on the index page that goes to the old site. Please use the /conversion.php if you check it out

解决方案

As mentioned in the comments you need to add a polyfill for the JSON object which is not supported on older browsers. See here for more info on browser compatibility of the JSON object. They mention that it should be compatible for IE8, but this is not always the case and if the user is running IE8 in compatibility-mode it won't work either.

You should include the polyfill script file before you load your other scripts, I recommend doing it in conditional comments:

<head>
  <!--[if lte IE 8]>
    <script src="/path/to/json3.js"></script>
  <![endif]-->
</head>

This would only load the polyfill for IE8 and below.

这篇关于远程调试一个网站? JSON与IE8问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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