1

I'm trying to load a compressed set of files .Css on a page, but in IE9 only loads a part of them. In other browsers and IE10-11 load correctly.

The code :

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />

   <?php
      foreach($view->_css as $css){
       echo '<link rel="stylesheet" href="'.$css.'">'."\n";  //loads all .css compressed
        }
        foreach($view->_js as $js){
           echo '<script src="'.$js.'"></script>'."\n";  //loads all .js
        }
        ?>
        <title>Test</title> ...

The file .css are: bootstrap.css , ace.css and other, but only work bootstrap.css. Someone know a fix? thanks

jgillich
  • 71,459
  • 6
  • 57
  • 85
Eduardo Andrade
  • 216
  • 4
  • 12
  • Can you share your array being returned as $view->_css? – David Corbin May 27 '14 at 16:10
  • Sure. [_css] => Array ( [0] => http://192.168.0.61/test/ec77744fa9a76363c2564a80007c64b7.css ) [_js] => Array ( [0] => http://192.168.0.61/test/5132b174c4bc7a8d6c7c4509e6f17225.js ) – Eduardo Andrade May 27 '14 at 16:16
  • Have you checked the MIME type of the stylesheet a and javascript? http://blogs.msdn.com/b/ieinternals/archive/2011/03/27/http-406-not-acceptable-php-ie9-standards-mode-accepts-only-text_2f00_css-for-stylesheets.aspx – David Corbin May 27 '14 at 16:20

1 Answers1

2

It's possible that you are running into Internet Explorer's CSS rules limits for IE9, which would explain why it effects IE9, but not later versions. If that is the case, you would want to split up your CSS files for IE9.

Community
  • 1
  • 1
James
  • 66
  • 3
  • Guys, thanks for your attention and help. @James, You are right.. The problem was just that there is a limit in relation to the IE9 css: [link] blogs.msdn.com/b/ieinternals/archive/2011/05/14/10164546.aspx [/link] The solution was a small implementation, our framework to split the css file when loaded in IE9 and pass the bounds of it. – Eduardo Andrade May 30 '14 at 17:59