我在 Windows 8.1 上使用 Dreamweaver CC 作为主编辑器,在编辑包含 Javascript 方案相对 URL 的 HTML 文件时,Dreamweaver 似乎在每次编辑和/或保存后挂起 15 秒以上。
只有当我在 Javascript 包含 (//) 上使用方案相对 URL 时才会发生这种情况。
例如,以下代码将导致发生此挂起:
<script src="//googleapis.com/jquery.min.js" type="text/javascript"></script>
然而,如果我将其替换为旧版本,则不会出现任何问题,并且这些挂起会消失:
<script src="https://googleapis.com/jquery.min.js" type="text/javascript"></script>
我认为发生的情况是 Dreamweaver 查找文件但找不到它,然后 Dreamweaver 挂起直到发生超时?
我尝试过的
我尝试更改常规 -> 首选项中的动态查找,但这没有效果,而且 Dreamweaver 似乎会忽略这些方案相对 url 的动态查找?
是否有任何已知的修复方法?
最佳答案
If the browser is viewing that current page in through HTTPS, then it’ll request that asset with the HTTPS protocol, otherwise it’ll typically* request it with HTTP. This prevents that awful “This Page Contains Both Secure and Non-Secure Items” error message in IE, keeping all your asset requests within the same protocol.
*Of course, if you’re viewing the file locally, it’ll try to request the file with the file:// protocol.
来自here .
您必须在服务器上运行此程序才能使方案使用 https://
或 http://
。
关于javascript - 使用方案相对 Javascript 包含 URL 时 Dreamweaver CC 挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21760069/