1. #1
    Touch Premium Member
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    1,483
    Vote Rating
    218
    LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold

      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
    336
    Vote Rating
    93
    Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light

      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,483
    Vote Rating
    218
    LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold LesJ is a splendid one to behold

      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