All the Embeded Resource should be 304 quickly

Page 1 of 2 12 LastLast
  1. #1

    All the Embeded Resource should be 304 quickly

    All the Embeded Resource should be 304 quickly and the Expire should be long Enough(99 year)
    if" Last-Modified<code role="listitem" class="focusRow subFocusRow "> " be checked Exist, Coolite should quickly return 304,and do no more action.


    </code>
  2. #2

    RE: All the Embeded Resource should be 304 quickly


    Agreed, that would be useful. In addition, with IIS 7 you do something like this to future expire resources in general:

        <system.webServer>
            <staticContent>
                <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="60.00:00:00" />
            </staticContent>
    
          ....
       </system.webServer>
    What I'd also like to see is if Coolite can combine its different JavaScript files into one, and same with CSS (including any custom themes) to minimize HTTP requests. (On a smaller scale it can improve GZip compression if you have enabled it on IIS a bit because there are more repeated patterns but the reduced HTTP requests is the big win in this particular situation)

    Lastly, I wonder if there is a way to combine all the Coolite JavaScript files with any other JavaScript files.

    For example, a large app I work on isn't fully Coolite so uses ASP.NET Ajax and other control vendors. So, in my main master page I have this:

            <%-- //script combining courtesy http://www.hanselman.com/blog/Commen...d5ed14a2a2--%>
            <asp:ScriptManager ID="ScriptManager" runat="server" CompositeScript-ScriptMode="Release">
                <CompositeScript>
                    <Scripts>
                        <asp:ScriptReference Name="WebForms.js" Assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                        <asp:ScriptReference Name="MicrosoftAjax.js" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                        <asp:ScriptReference Name="MicrosoftAjaxWebForms.js" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                        <asp:ScriptReference Path="~/my/custom/js1.js" />
                        <asp:ScriptReference Path="~/my/custom/js2.js" />
                    </Scripts>
                </CompositeScript>
            </asp:ScriptManager>
    In the code behind for the master page, I offer this method to any pages wanting to add more scripts into the mix:

            public void AddScript(string url)
            {
                if (string.IsNullOrEmpty(url) || url.Trim().Length == 0)
                {
                    throw url == null ? new ArgumentNullException("url") : new ArgumentException("url");
                }
    
                ScriptReferenceCollection scripts = AspNetScriptManager.CompositeScript.Scripts;
                if (!ScriptManagerUtility.ScriptManagerContains(scripts, url))
                {
                    AspNetScriptManager.CompositeScript.Scripts.Add(new ScriptReference(url));
                }
            }
    Its not perfect as different pages adding their own script means it is less likely to be cached for different pages, but in my particular case that is okay.

    It would be nice to have a way to include the ExtJs/Coolite JS in the composite script, or maybe Coolite has its own way to do this that could also take external scripts in the same way as above???
  3. #3

    RE: All the Embeded Resource should be 304 quickly

    sipo (5/5/2010) All the Embeded Resource should be 304 quickly and the Expire should be long Enough(99 year)
    if" Last-Modified<code role="listitem" class="focusRow subFocusRow "> " be checked Exist, Coolite should quickly return 304,and do no more action.


    </code>
    If the url path contains WebResource.axd, then the ASP.NET engine is running the resource caching outside of Coolite/Ext.NET. If the path ends in "coolite.axd" or "ext.axd", then we're setting the cache headers which expire the resource far into the future.


    Hope this helps.


    Geoffrey McGill
    Founder & CEO
  4. #4

    RE: All the Embeded Resource should be 304 quickly

    @Anup - We're going to be adding several new resource (.js and .css) grouping/combining features to the <ext:ResourceManager> in a future release. It won't make it into the initial v1.0 release, but hopefully not too long after that.

    This feature is a big priority for us, but after the v1.0 release.


    Geoffrey McGill
    Founder & CEO
  5. #5

    RE: All the Embeded Resource should be 304 quickly

    @Geoffrey: thanks for the update. Looking forward to the new resource manager!
  6. #6

    RE: All the Embeded Resource should be 304 quickly

    1.0 is WebResource.axd in Default

    and I can not Set other axd by Web.config or by CleanResourceUrl="false"

    do not work
  7. #7

    RE: All the Embeded Resource should be 304 quickly

    That is great news!

    I'd also like to request having an option to cache the InitScript when InitScriptMode="Linked". For those of us using MVC instead of postbacks, our views are read only and can be cached safely.

    Love the work you guys have been doing! Keep it up!
  8. #8

    RE: All the Embeded Resource should be 304 quickly

    Mark.Cooke (5/6/2010)That is great news!

    I'd also like to request having an option to cache the InitScript when InitScriptMode="Linked". For those of us using MVC instead of postbacks, our views are read only and can be cached safely.

    Love the work you guys have been doing! Keep it up!
    Unless your views are basically static, then caching the init script is going to cause pain and suffering. Given this is a framework for building data driven/rich applications, I'd be surprised if you don't have a data specific initscript. It may be possible if you are using url endpoints to fetch all data, which may avoid some of the data/user specific info being improperly cached and shared amongst users.


    caution great, would require


    Geoffrey McGill
    Founder & CEO
  9. #9
    Geoffrey,

    I know you said that your resource manager will have features to combine CSS and JavaScript in various ways in a release after 1.0 (hopefully very soon after it!)

    If it helps, installing Page Speed (Google's extension to Firebug) can quickly identify a number of things (some of which I appreciate won't be possible to address in its entirety etc)

    I assume there will then be the ability for us to add our own JS/CSS to the resource manager to be loaded after the main ExtNet scripts are loaded?

    Anup
  10. #10
    Quote Originally Posted by anup View Post
    I assume there will then be the ability for us to add our own JS/CSS to the resource manager to be loaded after the main ExtNet scripts are loaded?
    Currently you can add an <ext:ResourcePlaceHolder> into your <head runat="server"> to control the placement of the Ext.Net .js and .css file render location.

    Example

    <ext:ResourcePlaceHolder runat="server" />
    Hope this helps.
    Geoffrey McGill
    Founder & CEO
Page 1 of 2 12 LastLast

Similar Threads

  1. Resource Handler / Ext.NET initialization
    By Justin_Wignall in forum 1.x Help
    Replies: 0
    Last Post: Jul 27, 2012, 9:30 AM
  2. ext.asd resource not found
    By rkchak in forum 1.x Help
    Replies: 2
    Last Post: Mar 26, 2012, 7:19 PM
  3. RadioGroup with embeded objects
    By JsonTerre in forum 1.x Help
    Replies: 2
    Last Post: Sep 09, 2011, 3:21 AM
  4. How do you add a resource item
    By craig2005 in forum 1.x Premium Help
    Replies: 6
    Last Post: Feb 09, 2011, 7:44 PM
  5. Icon resource
    By Yannis in forum 1.x Help
    Replies: 1
    Last Post: Jun 22, 2010, 5:02 AM

Posting Permissions