2009-08-05 6 views
2

私はサーバーに置いたsvgファイルを可視化するためにchromeを使用しています。ここで死んだ簡単なhtmlはそれです:htmlサーバーでsvgzを使用しています

しかし、私は代わりにsvgzを使用しようとすると動作しません。ここでエラー

<a href="test.svgz">svgz</a> 

This page contains the following errors: error on line 1 at column 1: Encoding error Below is a rendering of the page up to the first error.

は、ブラウザが最初のファイルを解凍しないように私には見えるここで私が使用するコードです。 どのようにして私のブラウザにうまく表示するには、この(ずっと小さな)svgzファイルを作ることができますか?

答えて

0

ビルド13536以上で修正されているようです。⟨http://code.google.com/p/chromium/issues/detail?id=9737⟩だから、ブラウザをアップグレードする必要がありますか?

+0

おかげで、それは何か他のもの –

+0

は何だったことが判明しました何か他に?私は同じ問題を抱えている。どのように修正しましたか? – Hippyjim

2

私は、次の内容のウェブフォルダのルートにある.htaccessを追加する必要がありました:

AddType image/svg+xml svg 
AddType image/svg+xml svgz 
AddEncoding x-gzip .svgz 

をこれら2つのリンクherehere

+0

実際には動作を停止しました(同じエラーメッセージ、何が起こっているのかわかりません...) –

1

このページの情報から、IISと私の問題を解決するため あなたの答えのためのhttp://forums.iis.net/t/1175276.aspx/1

<system.webServer> 
    <rewrite> 
    <outboundRules> 
     <rule name="Rewrite SVGZ header" preCondition="IsSVGZ" stopProcessing="true"> 
      <match serverVariable="RESPONSE_Content_Encoding" pattern=".*" /> 
      <action type="Rewrite" value="gzip" /> 
     </rule> 
     <preConditions> 
      <preCondition name="IsSVGZ"> 
       <add input="{PATH_INFO}" pattern="\.svgz$" /> 
      </preCondition> 
     </preConditions> 
    </outboundRules> 
    </rewrite> 
    <staticContent> 
    <mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> 
    <mimeMap fileExtension=".svgz" mimeType="image/svg+xml" /> 
    </staticContent> 
</system.webServer> 
関連する問題