Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Problems with Internet Explorer when serving resources through custom sessi
This problem might not be caused by Vaadin directly, but maybe someone here has had a similar case:
I have a widget for displaying svg-files. These svg-files can import css-files and images. The css-file in turn can, in addition to styles, also reference some font files.
To serve all of these files, I implemented a custom RequestHandler and added it to the session.
To include the svg in my widget, I tested multiple things: For Firefox and Chrome, embedding the svg as the src of an iframe works fine. I also tried the jquery-addon jquery-svg, no problems here either.
However, on Internet Explorer (I used IE11 and also tried compatibility modes down to IE9), both approaches lead to the same problem:
The svg is loaded correctly. All images are loaded correctly. The css-files are requested and served correctly, I checked the response and it is as expected. However, the CSS content is completely ignored. Neither are there any further requests for the referenced font-files, nor are the css rules in the file applied at all.
I tested putting the same svg-file with its resources on the server as static resources (e.g. in the VAADIN-folder), or in their own context, and the content is loaded just fine on all browsers, the problem only occurs when providing the files through the session RequestHandler.
I also tried copying the contents of the css-file in the svg-file itself, without an @import. Again this works fine, even with the RequestHandler, but I would rather keep the css and the svg split.
Does anyone here have some experiences with this or has run into similar problems?
For anyone who is interested in the solution: I forgot to set the contentType of the response in the RequestHandler. It is done automatically for the static resources, but I had to do it manually in my case.