html - 存储帐户静态网站在 Firefox 中提供其他值,如在 IE 和 chrome 中

标签 html css azure azure-storage-account

我创建了一个简单的 index.html 文件。在我的存储帐户中,我启用了统计网站功能。当我将此 index.html 文件粘贴到 $web 容器中时,我可以通过以下方式导航到该文件 1. 使用以文件名作为索引的端点 URL。 2. 或者通过在/

之后键入文件名来使用端点 URL
  1. 我的静态网站的网址:https://storaccount.z6.web.core.windows.net/
  2. 我用来访问文件的 URL https://storaccount.z6.web.core.windows.net/index.html 现在奇怪的部分来了。在 Firefox 中,只有当我使用带有指定文件名的 url 时,我才执行标记 (2)。即使我在 azure 门户中指定 index.html 是索引页面。在 Chrome 中,url 或 url + 文件名都没有实现标签在 IE 中它们都有效。 URL 和 URL + 文件名 提供一些背景信息:

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> 

enter image description here

enter image description here enter image description here

这是我的错吗?我没有正确提及 html 文件中的样式标签? 这是 Azure 的错误(读取功能)吗?

这是 firefox:因为 Chrome 给出了带有两个 URL 的图片 1,而 IE 给出了带有两个 URL 的图片 2

最佳答案

如评论中所述,请检查 Report.html blob 的 Content-Type 属性。根据我的经验,当未定义内容类型属性时,IE 在呈现内容时会更智能一些。

要解决此问题,请将 blob 的 Content-Type 属性更改为 text/html,您应该也会在 Chrome 中看到它正确呈现。

关于html - 存储帐户静态网站在 Firefox 中提供其他值,如在 IE 和 chrome 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56062000/

相关文章:

javascript - 在 HTML5/jQuery/css3 中将单词(出现和消失)动画化到毫秒

html - 设置边框样式 :none; on my anchor tags but border shows up when I click on a link - why?

html - 页脚始终贴在底部

azure - 如何使用 Logic App 将 blob 从一个容器复制到另一个容器

Azure Api 管理 - cors 策略。无法动态地从命名值提供 <allowed-origins>

javascript - 无法在 Accordion 内交换 div

javascript - 添加 HTML、CSS 和 Javascript 到 Joomla 主页

html - 如何在 bootstrap 4 中正确对齐一系列图像?

javascript - 使用 Flexbox 使弹出窗口完全响应

azure - 将 AAD 应用程序添加为安全组的成员