• <tfoot id='sVywR'></tfoot>

      <i id='sVywR'><tr id='sVywR'><dt id='sVywR'><q id='sVywR'><span id='sVywR'><b id='sVywR'><form id='sVywR'><ins id='sVywR'></ins><ul id='sVywR'></ul><sub id='sVywR'></sub></form><legend id='sVywR'></legend><bdo id='sVywR'><pre id='sVywR'><center id='sVywR'></center></pre></bdo></b><th id='sVywR'></th></span></q></dt></tr></i><div id='sVywR'><tfoot id='sVywR'></tfoot><dl id='sVywR'><fieldset id='sVywR'></fieldset></dl></div>

      <small id='sVywR'></small><noframes id='sVywR'>

      <legend id='sVywR'><style id='sVywR'><dir id='sVywR'><q id='sVywR'></q></dir></style></legend>

          <bdo id='sVywR'></bdo><ul id='sVywR'></ul>

        header(“内容类型:文本/css");在 Firefox 和 Chrome 中运行,但在 Interne

        时间:2024-08-22

      1. <i id='fk5R1'><tr id='fk5R1'><dt id='fk5R1'><q id='fk5R1'><span id='fk5R1'><b id='fk5R1'><form id='fk5R1'><ins id='fk5R1'></ins><ul id='fk5R1'></ul><sub id='fk5R1'></sub></form><legend id='fk5R1'></legend><bdo id='fk5R1'><pre id='fk5R1'><center id='fk5R1'></center></pre></bdo></b><th id='fk5R1'></th></span></q></dt></tr></i><div id='fk5R1'><tfoot id='fk5R1'></tfoot><dl id='fk5R1'><fieldset id='fk5R1'></fieldset></dl></div>
        • <tfoot id='fk5R1'></tfoot>

            <tbody id='fk5R1'></tbody>

          <small id='fk5R1'></small><noframes id='fk5R1'>

            <bdo id='fk5R1'></bdo><ul id='fk5R1'></ul>

                1. <legend id='fk5R1'><style id='fk5R1'><dir id='fk5R1'><q id='fk5R1'></q></dir></style></legend>
                  本文介绍了header(“内容类型:文本/css");在 Firefox 和 Chrome 中运行,但在 Internet Explorer 9 中显示为“text/html"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  header("Content-type: text/css"); 适用于 Firefox、Chrome 等,但不适用于 Internet Explorer 9.我不确定发生了什么.

                  header("Content-type: text/css"); works in Firefox, Chrome and other, but not in Internet Explorer 9. I am not sure what's up.

                  在 Chrome 和 Firework 中,如果我在自己的选项卡中打开样式表并将其应用于页面,它会显示样式表.

                  In Chrome and Firework it shows the style sheet if I open it in its own tab and it's being applied to the page.

                  在开发者工具中网络下的 Chrome 中,它显示类型为 text/css,状态为 200.

                  In Chrome under Network in the developer tools it says the type is text/css and the status is 200.

                  在 Internet Explorer 9 中,如果我在自己的选项卡中打开样式表并且它没有被应用到页面,它想要下载样式表.

                  In Internet Explorer 9, it wants to download the style sheet if I open it in its own tab and it's not being applied to the page.

                  在 F12 开发者工具中,您可以点击网络,开始捕获并刷新页面.它显示了 Style.css.php.类型为text/html,结果为406.

                  In the F12 developer tools you can click on network, start capturing and refresh the page. It shows the Style.css.php. The type is text/html and the result is 406.

                  这是在头脑中:

                  <link rel="stylesheet" type="text/css" href="/assets/css/style.css.php" media="screen" />
                  

                  请求标头:

                  Key Value
                  Request GET /assets/css/main.css HTTP/1.1
                  Accept  text/css
                  Referer http://10.0.1.5/
                  Accept-Language en-US
                  User-Agent  Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
                  Accept-Encoding gzip, deflate
                  Host    10.0.1.5
                  Connection  Keep-Alive
                  Cookie  PHPSESSID=*Hidden*
                  

                  响应标头:

                  Key Value
                  Response    HTTP/1.1 406 Not Acceptable
                  Date    Fri, 01 Apr 2011 10:12:42 GMT
                  Server  Apache/2.2.14 (Ubuntu)
                  Alternates  {"main.css.php" 1 {type application/x-httpd-php}}
                  Vary    negotiate
                  TCN list
                  Keep-Alive  timeout=15, max=100
                  Connection  Keep-Alive
                  Content-Type    text/html; charset=iso-8859-1
                  

                  推荐答案

                  IE有不,我不是在开玩笑 Content-Type" 开关:

                  X-Content-Type-Options: nosniff
                  

                  顺便说一句:确保您还发送 Last-Modified 并在 PHP 中禁用 session.cache_limiter,否则浏览器将不断重新加载 CSS 文件,这将对性能产生负面影响.

                  BTW: make sure you also send Last-Modified and disable session.cache_limiter in PHP, otherwise browsers will keep reloading the CSS file, which will negatively impact performance.

                  这篇关于header(“内容类型:文本/css");在 Firefox 和 Chrome 中运行,但在 Internet Explorer 9 中显示为“text/html"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:下载名称与存储名称不同的文件 下一篇:PHP cURL 如何添加用户代理值或克服服务器阻止 cURL 请求?

                  相关文章

                  1. <i id='x9P5r'><tr id='x9P5r'><dt id='x9P5r'><q id='x9P5r'><span id='x9P5r'><b id='x9P5r'><form id='x9P5r'><ins id='x9P5r'></ins><ul id='x9P5r'></ul><sub id='x9P5r'></sub></form><legend id='x9P5r'></legend><bdo id='x9P5r'><pre id='x9P5r'><center id='x9P5r'></center></pre></bdo></b><th id='x9P5r'></th></span></q></dt></tr></i><div id='x9P5r'><tfoot id='x9P5r'></tfoot><dl id='x9P5r'><fieldset id='x9P5r'></fieldset></dl></div>

                      <legend id='x9P5r'><style id='x9P5r'><dir id='x9P5r'><q id='x9P5r'></q></dir></style></legend>

                      <small id='x9P5r'></small><noframes id='x9P5r'>

                        <bdo id='x9P5r'></bdo><ul id='x9P5r'></ul>

                      <tfoot id='x9P5r'></tfoot>