如何防止 HttpWatch 对 javascript 单行注释进行 404ing
如何防止 HttpWatch 将 javascript 单行注释解释为对缺失资源的调用,从而导致 404 错误?
How do you prevent HttpWatch from interpreting javascript single-line comment as call to a missing resource thus resulting in a 404 error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
也许你应该问问 HttpWatch 的人? 这与javascript无关。
Perhaps you should ask the HttpWatch-guys? This has nothing to do with javascript.
HttpWatch 不解释 javascript - 它只是记录浏览器生成的 HTTP 流量。 您看到的任何 404 错误都只是由 HttpWatch 报告的,而不是由它生成的。
如果您可以提供来自 HttpWatch 的 .hwl 文件或发生这种情况的公共 URL,我们将查看生成 404 的原因。
您可以通过[电子邮件受保护]直接与我们联系。
HttpWatch doesn't interpret the javascript - it just records the HTTP traffic generated by the browser. Any 404 error that you see is merely being reported by HttpWatch not generated by it.
If you can provide a .hwl file from HttpWatch or a public URL where this occurs we'll have a look to see why the 404 is generated.
You can contact us directly at [email protected].
我认为它认为
//...
旨在成为一个相对 URI,只是没有方案。I think it thinks that the
//…
is intended to be a relative URI just without the scheme.原始发帖者可能引用了 HttpWatch 日志中出现的无效 URL http://:/。 这是 javascript 库中尝试模拟 IE 中 DOMContentLoaded 事件的常用技术的副作用:
http://blog.httpwatch.com/2007/11/20/error_internet_invalid_url-httpwatch/
The original poster could be referring to the invalid URL http://:/ appearing in the HttpWatch log. This is a side effect of a commonly used technique in javascript libraries that attempt to emulate a DOMContentLoaded event in IE:
http://blog.httpwatch.com/2007/11/20/error_internet_invalid_url-httpwatch/