I have created a simple index.html file.In my storage account I have enabled the function statistic websites.When I paste this index.html file inside the $web container I can navigate to the file by 1. using the endpoint URL with the name of the file as index. 2. or by using the endpoint URL by typing the name of the file after the /
HTML file:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style> TABLE {border-width: 1px; border-style: solid; border-color: black; border-collapse: collapse;} TH {border-width: 1px; padding: 3px; border-style: solid; border-color: black; background-color: #6495ED;} TD {border-width: 1px; padding: 3px; border-style: solid; border-color: black;} </style> </head><body> <table> <colgroup><col/><col/><col/><col/><col/></colgroup> <tr><th>Date</th><th>Vm</th><th>ResourceGroup</th><th>Event Initiated By</th><th>Subscription Name</th></tr> <tr><td>16/04/2019</td><td></td><td></td><td></td><td>-</td></tr> <tr><td>16/04/2019</td><td></td><td></td><td></td><td>-</td></tr> <tr><td>09/04/2019</td><td>--</td><td>-</td><td></td><td>-</td></tr> <tr><td>26/04/2019</td><td></td><td></td><td>.</td><td>-</td></tr> <tr><td>15/04/2019</td><td></td><td></td><td></td><td>-</td></tr> <tr><td>26/04/2019</td><td></td><td></td><td></td><td></td></tr> <tr><td>29/04/2019</td><td></td><td></td><td></td><td>-</td></tr> <tr><td>08/04/2019</td><td>-</td><td></td><td></td><td>-</td></tr> </table> </body></html>
Is this my fault. That I didn't mention the style tag in the html file properly ? Is this a bug (read feature) of Azure ?
This is firefox: because Chrome gives Picture 1 with both URLs and IE gives picture 2 with both URLs
As mentioned in the comments, please check the Content-Type
property of Report.html
blob. In my experience, IE is somewhat more smarter in rendering content when content-type property is not defined.
To fix the problem, please change the Content-Type
property of the blob to text/html
and you should see it rendered properly in Chrome as well.