mwrock / RequestReduce

Instantly makes your .net website faster by reducing the number and size of requests with almost no effort.
www.requestreduce.org
Apache License 2.0
228 stars 49 forks source link

Only some files are processed #204

Closed mcintyre321 closed 11 years ago

mcintyre321 commented 12 years ago

Hi!

For some reason, only some of the scripts I have in my site are being run through RR.

See my head section below - there are a mixture of RR processed files and unprocessed javascript files (I have CSS compression turned off right now)

Why would this be happening?

<head>
    <title>Home</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="imagetoolbar" content="false" />
    <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
    <script src="/scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="/scripts/jquery-ui-1.8.16.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.globalize/globalize.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.globalize/cultures/globalize.culture.en-GB.js"></script>
    <script type="text/javascript">
        Globalize.culture("en-GB");
    </script>
    <script src="/app_data/RequestReduceContent/eb221ab04d07b290c6adc6d1ce3b8817-9193e0b9faaf9ee6c7098dcd27cffb38-RequestReducedScript.js" type="text/javascript" ></script>    <script src="/scripts/jquery-news-ticker/jquery.ticker.js" type="text/javascript"></script>
    <script src="/scripts/jquery.timepicker.js" type="text/javascript"></script>
    <script src="/scripts/bootstrap.js" type="text/javascript"></script>
    <link rel="stylesheet" href="/Content/bootstrap.css" type="text/css" />
    <script src="/app_data/RequestReduceContent/6845fea9e0b14044fcc7ea332140e469-343179d52d96d6937af9b6fa2d9c4a6e-RequestReducedScript.js" type="text/javascript" ></script> 
    <link type="text/css" href="/Content/DataTables-1.9.2/media/css/jquery.dataTables.css" rel="stylesheet" />
    <script src="/Scripts/DataTables-1.9.2/media/js/jquery.dataTables.js" type="text/javascript"></script>
    <script src="/Scripts/jquery.dataTables.columnFilter.js" type="text/javascript"></script>
    <script src="/Scripts/DataTables-1.9.2/extras/TableTools/media/js/ZeroClipboard.js" type="text/javascript"></script>
    <script src="/Scripts/DataTables-1.9.2/extras/TableTools/media/js/TableTools.js" type="text/javascript"></script>
    <link type="text/css" href="/Content/DataTables-1.9.2/extras/TableTools/media/css/TableTools.css" rel="stylesheet" />

    <script src="/scripts/jquery-quicksearch.js" type="text/javascript"></script>
    <script src="/scripts/jsonreport.js" type="text/javascript"></script>
    <script src="/scripts/jquery.templates.resig.js" type="text/javascript"></script>
    <script src="/scripts/jeditable/jquery.wysiwyg.js" type="text/javascript"></script>
    <script src="/scripts/jeditable/jquery.jeditable.js" type="text/javascript"></script>
    <script src="/scripts/jeditable/jquery.jeditable.wysiwyg.js" type="text/javascript"></script>
    <script src="/scripts/jeditable/controls/wysiwyg.link.js" type="text/javascript"></script>
    <script src="/scripts/jeditable/controls/wysiwyg.image.js" type="text/javascript"></script>
    <script src="/scripts/jquery.iframe-transport.js"></script>
    <link rel="stylesheet" href="/content/aristo/Aristo.css" type="text/css" />
    <link rel="stylesheet" href="/content/jquery-news-ticker/styles/ticker-style.css" type="text/css" />
    <link rel="stylesheet" href="/content/jeditable/jquery.wysiwyg.css" type="text/css" />
    <link rel="stylesheet" href="/content/Site.css" type="text/css" />
    <script src="//www.google.com/jsapi" type="text/javascript"></script>
    <link rel="stylesheet" href="//www.google.com/cse/style/look/default.css" type="text/css" />

    <link rel="stylesheet" href="/Content/bootstrap-responsive.css" type="text/css"/>

    <script src="/scripts/site.js" type="text/javascript"></script>

</head>
mwrock commented 12 years ago

Here are some reasons scripts and CSS won't be processed.

Scripts and CSS: The URLs are filtered via your config settings or an API call. There was an error accessing the files. The rt dashboard will report these errors. the response was not the appropriate content type. If it's not text/css or one of the js types, rt will ignore it.

Js only: If the script has a max age or expiration header that is under a week, rt will ignore it. This will also happen if the cache control header is set to no-cache.

mcintyre321 commented 11 years ago

Hi I've figured out that ASP is serving my Embedded Resource based assets using the System.Web.StaticFileHandler which has a hard-coded 24hour expiry header (and Etags). Is there a way to configure the week limit on including things in RR?

mcintyre321 commented 11 years ago

Looks like this can be fixed using ignoreNearFutureJavascriptDisabled="true", which causes it to not use the 7 day limit.