I have an html file stored in my SQL database as binary. The html contains image directories, and the images are stored in those directories on the server.
Chrome, Safari, Firefox, IE7, and IE8 all display the images and html text, but IE9 just displays the html text and the words ‘bitmap’ in place of the images.
This code outputs the html:
Response.Clear();
Response.CacheControl = "no-cache";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetValidUntilExpires(false);
Response.ExpiresAbsolute = DateTime.Parse("1/1/2000");
Response.Expires = 0;
b = Compression.DeCompressByteArray(b);
Response.OutputStream.Write(b, 0, b.Length);
Response.End();
This is just a snippet showing the main output procedure.
Copying the image directories from the output html and placing it in my address bar opens the images, but IE9 doesn’t want to display them inside the html and instead displays the word ‘bitmap’
Furthermore:
- The html(and images) output from SQL,
when run as a standalone html works
on all browsers. - The images do display in IE9 when
embed, if I have compatibility
mode on (but that breaks other
stuff).
To answer this question:
The html streamed from my SQL Server doesn’t define a doctype and is therefore run in Quirks Mode in IE8 down. IE9 forces an iframe without a doctype to use the doctype of it’s parent.
The html is from the output of excel which doesn’t produce a doctype when published.