Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Gaskell 59 posts 142 karma points
    Apr 22, 2010 @ 16:54
    Chris Gaskell
    0

    PeterD.Compress missing some CSS files

    Hi all,

    I've implemented Peter's compression package on our Umbraco instance. It's working in that it's combining and compressing my JS files and sending the page down gzipped.

    However the plugin seems to have missed most of my css files - but it has found some.

    Here's the code:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <link href="/css/homepage.css" rel="stylesheet" />
    <link href="/css/structure.css" rel="stylesheet" />
    <link href="/css/common.css" rel="stylesheet" />
    <link href="/css/blog.css" rel="stylesheet" />
    <script src='/js.axd?files=Scripts/jquery-1.3.2.js,Scripts/jquery.url.js,Scripts/jquery.slider.js,Scripts/jquery.banners.js,Scripts/jquery.jcarousellite.js,scripts/jquery.product_landing.js,Scripts/DatePick/date.js,Scripts/datepick/jquery.datePicker.js,Scripts/datepick/jquery.autotab-1.1b.js,Scripts/jquery.watermarkinput.js,Scripts/jquery.meet_team.js,Scripts/jquery.jobs.js,Scripts/jquery.curvycorners.min.js' type='text/javascript' ></script>
    <script type="text/javascript">
    </script>
    <title>...</title>
    <link href='/css/datepick/css.axd?files=datepicker.css' type='text/css' rel='stylesheet' />

     

    Does anyone have any ideas?

    Thanks,

    Chris

  • Chris Gaskell 59 posts 142 karma points
    Apr 22, 2010 @ 17:11
    Chris Gaskell
    0

    I found the problem...

    The css files where declared as:

    <link href="/css/homepage.css" rel="stylesheet" />

    But needed to be declared as:

    <link href="/css/homepage.css" rel="stylesheet" type="text/css" media="screen" />

    The type property is required. Too right 'n' all. :-)

    Thanks.

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Apr 22, 2010 @ 20:15
    Peter Dijksterhuis
    1

    Hi,

    glad you found the problem yourself :)

    Indeed, the type="text/css" is required, because there are other link-items that you don't want processed.

    Cheers,

    Peter

Please Sign in or register to post replies

Write your reply to:

Draft