Firebug 使用 xml:base 属性指示 SVG 中的两个请求
我在 中有一个可用的 SVG 绘图,其中包含一些
元素。该图位于一个位置;相对于另一个图像的图像。这是 HTML:
<iframe src="/howl/svg/id/482?width=535&height=325"></iframe>
这是 SVG,它是 的源:
<svg xml:base="/howl/">
<svg width="535" height="325" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="svg_1">
<image xlink:href="file/id/472" id="svg_4" height="516" width="631" y="-95.5" x="-48"/>
</g>
</svg>
</svg>
一切都正常显示。但是,根据 firebug,我收到两个请求:
http://localhost:8086/howl/file/id/472
- 这是正确的并且可以正确加载。http://localhost:8086/howl/svg/id/file/id/472
- 这是不正确的。
有趣的是,错误的请求不会返回 404,而是在 Firebug 中用一个神秘的旋转器无限期地搅动。我也无法单击检查该请求。如果我直接在浏览器中输入此 URL:
http://localhost:8086/howl/svg/id/file/id/472
我会收到 404 Not Found,这是我所期望的,但不是 Firebug 报告的内容。
这是我的 SVG 有问题吗? Firebug 错误?第二个请求是否已经提出?
谢谢!
更新:我已经包含了整个源代码。
I have a working SVG drawing in an <iframe>
with some <image>
elements. The drawing is located in one location; the images relative to another. Here is the HTML:
<iframe src="/howl/svg/id/482?width=535&height=325"></iframe>
Here is the SVG that is the source for the <iframe>
:
<svg xml:base="/howl/">
<svg width="535" height="325" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="svg_1">
<image xlink:href="file/id/472" id="svg_4" height="516" width="631" y="-95.5" x="-48"/>
</g>
</svg>
</svg>
Everything displays properly. However, according to firebug, I'm getting two requests:
http://localhost:8086/howl/file/id/472
- This is correct and loads properly.http://localhost:8086/howl/svg/id/file/id/472
- This is incorrect.
Interestingly, the incorrect request does not return a 404, but churns indefinitely in Firebug with a mysterious spinner. I am also unable to click-inspect the request. If I type this URL directly into my browser:
http://localhost:8086/howl/svg/id/file/id/472
I get a 404 Not Found, which is what I would expect, but not what Firebug reports.
Is this a problem with my SVG? A Firebug error? Is the second request even being made?
Thanks!
Updated: I've included my entire source code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也看到了这些请求,但这正是 Firefox 所做的。所以,这似乎不是Firebug的问题(其他Firefox监控工具也显示同样的情况)。
我对 SVG 没有太多经验,但如果我将:替换
为,
我只会看到两个请求。 xml:base 的用途是什么?
I am also seeing these requests, but it's just what Firefox does. So, it doesn't seem to be Firebug problem (other Firefox monitoring tools show the same).
I don't have much experience with SVG, but if I replace the:
with
I see only two requests. What is the xml:base for?