搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

How can I view with Firefox my local windows .svg files. I can view then OK if I change type to .htm.

  • 4 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 pabristow

more options

I have a program writing SVG files and these work file when embedded into an html file.

As a trivial example:

<svg version="1.1"
     baseProfile="full"
     xmlns="http://www.w3.org/2000/svg"
		 xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:ev="http://www.w3.org/2001/xml-events"
     type="image/svg+xml">
  <rect width="100%" height="100%" fill="red" />
  <circle cx="150" cy="100" r="80" fill="green" />
  <text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text>
</svg>

If this file has the file type html or htm, I can view OK with Firefox, but if it is of type .svg, Firefox wants to save or try another program (Inkscape, Opera ...) - I have tried configuring Firefox as the SVG program, but this seems not permitted.

This used to work OK on older version of Firefox and was very convenient during testing. Please tell me how can I make it work again?

I have a program writing SVG files and these work file when embedded into an html file. As a trivial example: <pre><nowiki><svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" type="image/svg+xml"> <rect width="100%" height="100%" fill="red" /> <circle cx="150" cy="100" r="80" fill="green" /> <text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text> </svg></nowiki></pre> If this file has the file type html or htm, I can view OK with Firefox, but if it is of type .svg, Firefox wants to save or try another program (Inkscape, Opera ...) - I have tried configuring Firefox as the SVG program, but this seems not permitted. This used to work OK on older version of Firefox and was very convenient during testing. Please tell me how can I make it work again?

由cor-el于修改

所有回复 (4)

more options

Try to delete the mimeTypes.rdf file in the Firefox Profile Folder to reset all file actions.

more options

Sadly, deleting memTypes.rdf has no effect on this problem.

Right clicking on the demo.svg file and choosing OpenWith, and then Firefox produces a window as below, choosing Firefox as the open program gets you back to the same window. (Ticking the 'always use this program' option box causes an endless loop opening endless tabs until Firefox is stopped!!!).

Firefox obviously can render SVG files, either embedded or named .html but something is blocking this if the Windows file type is .svg (a regression from previous behaviour).

more options

I don't have any problems with opening such a SVG file in Firefox.

You can try to check the registry and do a search for svg.

  • HKEY_CLASSES_ROOT\.svg

You can also check the linked MIME type in the MIME Database.

  • HKEY_CLASSES_ROOT\MIME\Database\Content Type
more options

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.svg] @="inkscape.svg" "Content Type"="application/svg"

As my default program for svg is Inkscape.

(but nothing in HKEY_CLASSES_ROOT\MIME\Database\Content Type )

Control Panel\All Control Panel Items\Default Programs\Set Associations

changing

.svg SVG Document Inkscape

to

.svg SVG Document Firefox

I have now Associated .svg with Firefox but the HKCR entry is still saying as above.

So I have deleted this entry completely, so Inkscape is not longer associated with .svg?

svg files now show with the firefox icon as expected, but when I try to open I get into the endless loop as before :-(

Other suggestions? Thanks.