We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Hi Chanh,

    You might try making the link as simply:
    <link href="[(site_url)]mycss.css" rel="stylesheet" type="text/css" />


    Does that help?
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 34162
      • 1 Posts
      I made the chance but it makes no different in IE.

      FF seems to work though in either case!
      • I don’t get a style in FF from here.

        I always use href="[~xx~]" for my css documents, and have never had any trouble with either FF, Safari or IE.

        However, I have my friendly url suffix blank, and make a suffix part of the document’s alias. That seems to keep IE happy.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 34162
          • 1 Posts
          Susan,

          That is an option that I was hoping to avoid due to the reason that I have to type in the whole alias including .html on each document whereas the suffix will save those extra keystroke.

          That’s odd that you don’t get the style in FF at your end!

          Thanks
          • Well, when I did have the default as .html, FF seemed perfectly happy with mystyle.html, and I never saw a problem with IE, but some have said they get IE trying to download the file. So now I don’t use a suffix at all unless I want to, as with a css document. Who says my pages have to have a .html suffix? I can have .susanisthegreatest if I want to! Or none at all. At least, until the code that writes the friendly URLs gets changed to look at the content-type before making the url.



              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
            • Here is an interesting discussion of the issue, and why it seems to work for some people and not others:

              http://ppewww.ph.gla.ac.uk/~flavell/www/content-type.html
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 6726
                • 7,075 Posts
                IE indeed tend to get me a lot of unstyled pages on first page load with CMS that store the stylesheets in the database (it did too with textpattern. I don’t know how, but this was solved a while ago...). If I reload the page it just end up loading the css (at last !). (Edit: Susan’s pointer maybe explain why : "MSIE sent a different Accept header on "Refresh" and similar operations than it sent on initial retrieval. In fact, on refresh/reload it sent */*" ... interresting...)

                The last website I build with MODx I had to switch from using CSS as Document to plain old static file for CSS, else IE required the reload of page to load the CSS (could have gone with an alternate stylesheet for IE but didn’t want to). It’s good that you mention this again because I have been meaning to confirm this with other users before I reported this in FlySpray. It’s plain annoying...

                About some people having their css downloaded instead of loaded couldn’t it be their server settings ?

                Once thing I’ll do is maybe use HTTP Tracer to understand what the heck is going on with IE.

                @Susan : I’ll try the suffix method you suggest, and thanks for the pointer interresting read !
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                • I wonder if a link vs. an @import of the stylesheet would make a difference?
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 34162
                    • 1 Posts
                    I just changed from link to import and it is the same in IE no different.

                    http://www.chanh.blogdns.com/modx/testing.html
                      • 7455
                      • 2,204 Posts
                      in your template it say’s: <style type="text/css" media="screen, tv, projection">
                      @import url("http://www.chanh.blogdns.com/modx/mycss.css");
                      </style>

                      but http://www.chanh.blogdns.com/modx/mycss.css does not exist

                        follow me on twitter: @dimmy01