Opera:.js文件将无法加载 [英] Opera: .js file won't load

查看:309
本文介绍了Opera:.js文件将无法加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面调用脚本中的脚本,像这样:

 < script type =text / javascriptsrc =http://www.discoverfire.net/analytics/l/a.js>< / script> 

(请注意,您无法加载此脚本,因为它是作为临时域在本地DNSd)



很简单。

这个基本的,方形的功能。



Opera,但是,拒绝加载脚本。任何变量或函数都是未定义的,在dragonfly中,脚本标签显示在DOM中,但脚本选项卡显示找不到脚本文件。



任何想法Opera为什么讨厌我? >有没有安全/ javascript的东西,我失踪了?



有些事情可能是相关的,但实际上应该没有区别:




  • 脚本与网页位于不同的网域。

  • 脚本仅在我的本地网络上可用。域名在本地进行分级,从网络外部它指向其他地方。 Opera是否具有秘密使用外部DNS服务器的设置?

  • 脚本适用于所有其他浏览器。

  • 问题不在于脚本内容。



更新:



好,问题似乎是Opera对待网域的方式。



该脚本到几个其他域,并且它的工作很好。我已将它移动到本地DNS域的几个路径,它不会在该域的任何地方工作。



这让我相信,问题是,Opera不能或不会,从某些原因从这个域加载脚本。



奇怪的是,似乎没有问题,加载页面和其他来自域的资源,问题只在于.js文件。



域已注册,但已暂停。我们在本地DNS,因此我们可以使用它进行分期/测试,这可能是与JS的安全性,以某种方式混乱。



我可能错了,但我 - 真的不知道。



$ b

更新2: b

关于Dragonfly和错误控制台/开发者工具,他们根本没有说明脚本。对于应该从脚本中出现的变量和函数,有大量未定义的变量错误,但除此之外,没有错误。奇怪的是,脚本标记确实显示在DOMM中,但是如果我点击脚本标签,它会显示找不到脚本。



更新3:



没有封锁的内容,因此我们至少可以排除该设置。

解决方案

像Jacob建议的,你应该检查它是否被阻止。要执行此操作:




  • 右键点击您的页面


  • 在屏幕顶部,点击详情...按钮
  • 在当前页面上阻止

I have a page that calls a script in the header, like so:

<script type="text/javascript" src="http://www.discoverfire.net/analytics/l/a.js"></script>

(Note you will NOT be able to load this script as it is DNSd locally as a staging domain)

Very Simple.

Firefox, IE, Chrome all have no problem with this basic, square-one feature.

Opera, however, refuses to load the script. Any variables or functions in it are "undefined" and in dragonfly, the script tag is shown in the DOM, but the "Script" tab says "No script files found."

I go to google and find random pages, their external .js files seem to work just fine.

Any idea why Opera hates me? Is there a security/javascript thing I am missing?

A few things that may be relevant, but really should make no difference:

  • The script is on a different domain than the page.
  • The script is only available on my local network. The domain is DNS'd locally for staging, from outside the network it points somewhere else. Does Opera have a setting to secretly use an external DNS server?
  • The script works on every other browser I have.
  • The problem isn't in the script content. I've reduced it to a single line with an alert and it simply won't work in Opera.

Update:

OK, the problem seems to be how Opera treats the domain.

I have moved the script to several other domains, and it DOES work just fine. I've moved it to several paths on the locally DNS'd domain, and it won't work from anywhere on that domain.

This leads me to believe that the problem is that Opera can't, or won't, load the script from this domain for some reason.

Strangely, there seems to be no problem loading pages and other resources from the domain, the problem lies in .js files only.

The domain is registered, but parked. We DNS'd it locally so we can use it for staging/testing, and that may be messing with Opera somehow with JS security.

I could be wrong though - I really have no idea. If anyone else has one, I'd love to hear it.

Update 2:

Regarding Dragonfly and the error console/developer tools, they don't say anything about the script at all. There are plenty of Undefined Variable errors for variables and functions that should be present from the script, but other than that, no errors. Oddly, the script tag does show up in the DOMM, but if I click on the Scripts tab, it says "No Scripts Found".

Update 3:

There is no blocked content, so we can at least rule out that setting.

解决方案

Like Jacob suggested, you should check if it isn't blocked. To do this:

  • Right-click on your page
  • Select "Block Content..." in the context menu
  • At the top of the screen, click the "Details..." button
  • You should see the URL's that are blocked on the current page

这篇关于Opera:.js文件将无法加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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