“查看为MIME类型”在Chrome或Firefox中 [英] "View As MIME Type" in Chrome or Firefox

查看:731
本文介绍了“查看为MIME类型”在Chrome或Firefox中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以强制Firefox或Chrome浏览器将加载的资源解释为特定的MIME类型?例如,在线SCC提供的原始代码视图诸如Google Code之类的接口默认发送内容为 text / plain 。如果我正在查看HTML文件,我希望能够在浏览器中覆盖它,并将其视为 text / html



是否提供Firefox或Chrome的任何扩展或隐藏命令,提供View as MIME type功能?

解决方案对于Firefox,有一个附加组件提供了几乎所需的功能: https://addons.mozilla.org/en-US/firefox/addon/force-content-type/ 。不知道是否有Chrome扩展。

即使功能存在,我也不建议你在你的例子中使用它:任意的HTML都可以访问到google.com域的cookie和脚本,这在安全性方面确实很糟糕。


Is there any way to force either Firefox or Chrome to interpret a loaded resource as a particular MIME type?

For example, the raw code views provided by online SCC interfaces such as Google Code send content as text/plain by default. If I'm looking at an HTML file, I'd like to be able to override this in the browser and view it as text/html.

Are there any extensions or hidden commands for Firefox or Chrome that provide "View as MIME type" functionality?

解决方案

For Firefox, there is an add-on provides almost the function you wanted: https://addons.mozilla.org/en-US/firefox/addon/force-content-type/ . No idea if there is a Chrome extension or not.

Even if the functionality exists, I wouldn't recommend you to use it in your example: Arbitrary HTML would have access to google.com domain for cookie and script, which is really really bad in terms of security.

这篇关于“查看为MIME类型”在Chrome或Firefox中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆