Hi everyone, I'm currently trying to browse a web page containing a .svg image file from the Keil webserver. I'm using Keil 4.21 and the TCPnet RL-ARM library.
The page is browsed correctly by firefox, IE9, safari etc. with one exception for IE8. It is a known fact that IE8 does not support natively the .svg files, so I'm trying to find a workaround to have compatibility with IE8.
A tried 2 solutions :
- Using the adobe svg viewer plugin for IE8. In this case IE8 browse the page correctly from my local computer (IE8 ask permission for activeX contents and activate the plugin), but from the keil web server the same page doesn't browse correctly (the image is not showed, and IE8 ask no permission for activeX contents).
- Using google svgweb javascript library. In this case a page is browsed correctly when charged from the local webserver provided along with the library, but the same page is not printed correctly from Keil web server (image is not showed). The path to the javascript library is correct in my web page, but it seems that the library cannot by used for some reason.
Has anyone already find a workaround to use .svg files with IE8 along with Keil webserver ? Do you have an idea why the two above don't work ?
Thank you for your replies.
Hi everyone, I found the following explanation in the documentation of the javascript library :
You must ensure that your web server has the correct MIME settings for Flash SWF files (application/x-shockwave-flash), Microsoft HTC files (text/x-component), and SVG files (image/svg+xml). Since many developers don't know what MIME types are or don't have the ability to change this setting on their web server, SVG Web comes with a number of utilities to make this easier.
First, your web server might already be configured out of the box and there is nothing to change. To test this, make sure the file src/tools/config.html is on your web server and hit it with a web browser. This file will scan and make sure the MIME type settings are set. If they are not it will report this to you and you will have to move to the next step. If the SVG mime type is not set correctly you can generally get away without changing this; note though that Firefox can sometimes exhibit bugs if the SVG MIME type is not set to image/svg+xml.
At this point the best step is to actually change your web server to add these MIME types. If you don't have the ability or background to add MIME types to your web server, three easy files have been provided that will do the work for you based on what you can run on your server (PHP, JSP, or ASP). Based on what you can run on your server, choose one of the following files:
src/svg-htc.php - Will do the MIME work for you if you can run PHP on your web server.
src/svg-htc.jsp - Will do the MIME work for you if you can run JSP on your web server.
src/svg-htc.asp - Will do the MIME work for you if you can run ASP on your web server.
If you choose one of these, you must indicate so using the optional data-htc-filename attribute in any HTML page that uses SVG Web:
<script src="../svg.js" data-path=".." data-htc-filename="svg-htc.php"></script>
As the config.html file doesn't work correctly I fear that the MIME types needed are not supported by the webserver. And it seems that (PHP, JSP, or ASP) are not supported either.
Can someone confirm that, or tell me where I can found the information about MIME and PHP JSP ASP compatibility ?
In case of non compatibility I think I will give up...
No need to ask about php, asp, jsp compatibility. Keil will hardly hide a complete virtual machine for running php, asp, jsp scripts.
Your questions just has to be narrowed down to this one: Are there alternative ways to update the set of supported MIME types than to modify the source code for the Keil embedded web server?
I can't help you there, since I'm not using it.