1. #1
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,340
    Vote Rating
    131
    LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all

      0  

    Default Inline CSS and JavaScript?

    Inline CSS and JavaScript?


    This is the page source of my application built with Cmd... It's nice and small.

    If Cmd inlined the *-all.css and all-classes.js files, there would be two fewer HTTP requests... This should be better for performance

    Code:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Risk</title>
    <link rel="stylesheet" href="resources/Risk-all.css"/>
    <script type="text/javascript" src="all-classes.js"></script>
    </head>
    <body></body>
    </html>

  2. #2
    Sencha - Ext JS Dev Team Phil Guerrant's Avatar
    Join Date
    May 2011
    Location
    Colorado
    Posts
    321
    Vote Rating
    87
    Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice Phil Guerrant is just really nice

      0  

    Default


    Keep in mind, it's not just about the initial page load, but also what happens when the user hits the refresh button. With inline js/css the browser would have to download the entire source every refresh, but external files may be loaded from cache.
    Phil Guerrant
    Ext JS - Development Team

  3. #3
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,340
    Vote Rating
    131
    LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all LesJ is a name known to all

      0  

    Default


    Quote Originally Posted by Phil Guerrant View Post
    Keep in mind, it's not just about the initial page load, but also what happens when the user hits the refresh button. With inline js/css the browser would have to download the entire source every refresh, but external files may be loaded from cache.
    Good point about caching! Thx

Thread Participants: 1