none
Fast loading index page question RRS feed

  • Question

  • I plan to change my existing home page on www.drachsi.com as the page takes about 4-5 seconds to download. I thought would create a basic html page of text, linking to the old home page, which would have a new name.

    The problem I have is I would like to pre download the Javascripts and CSS used on the other pages to make every other page load fast.

    Where can a get a script to do this?

     

    Regards

     

    Pete

    Thursday, January 19, 2012 6:38 AM

Answers

  • I guess the answer is nearly there, I thank all the above members for their replies. I have been given the following link to see my page speed and results, and find it hard to progress the items in the red zone. ( I don't understand lots of it) http://gtmetrix.com/reports/www.drachsi.com/iOnz2Vlf

    If you don't understand it, why worry about it? Seriously?

    Looking at the top three items (the red, "maximum impact" items) shows the first to be "Defer parsing of JavaScript." Right, and when you expand that item you find that most of the stuff referenced is external to your site and is associated with Google and with various sharing icons. You don't control that stuff, so don't concern yourself with it.

    That second one, "Leverage browser cache," well, if you google it you find that you need to send an extended expiry date in the HTTP header for those resources. If you're really desirous of addressing that, google "leverage browser cache," and you'll find all kinds of interesting, esoteric htaccess information. You go right ahead with that. It's not something I'm that concerned with.

    Finally, you've got "Combine images using CSS sprites." Unh, huh. Looking at those image sizes—7 bytes, 56 bytes, 322 bytes... all you're saving is the time for the HTTP requests. Sorry, not high on my list of urgently needed optimizations.

    For large, highly graphical or data-driven sites, such optimizations can add up when considered cumulatively. For the average small business site, not so much. And when considering things over which you have no control, such as when external scripts are parsed, I'd say "much ado about nothing."

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    • Edited by paladyn Sunday, January 22, 2012 7:23 PM
    • Marked as answer by Drachsi Monday, January 23, 2012 6:11 AM
    Sunday, January 22, 2012 7:21 PM
  • What Bill said. Besides the graphics page weight those social buttons add, note that addthis, sharethis, and Google's plusone between them comprise ten out of the sixteen javascripts reported in the aforementioned "Deferred parsing" stat, and that those represent 450.7 kB out of that 643kB total page weight! So, not only is deferring their parsing beyond your control, they represent 70% of the page weight that is causing it to be so slow in downloading and rendering!

    Just out of curiosity, whatever gave you the idea that having all that social networking cruft on your site was a good idea? Seriously, I'd like to know who is promulgating it.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    • Marked as answer by Drachsi Monday, January 23, 2012 6:10 AM
    Monday, January 23, 2012 2:42 AM

All replies

  • Fisrt off the current page takes less than two seconds for me, on a mid-speed connection, so I don't think you need to worry too much unless the page is intended to be mobile friendly. (I didn't test or look at that).

    Secondly the only way you can get the js and css files into thew users browser cache is to have a page that uses them. To do it independantly from a cut down home page would mean having another page load in the background which is possible but probably not worth the effort. 

    One way you may get some improvement is to minify both the js and css files. The Chrome Developer tools can do this for you reasonably well.

    HTH

     PS. You could also minimise the size of the images slightly too. It all helps.


    Ian Haynes

    EW - V4 Add-Ins
    EW - Resources, hints and tips
    EW - Design for the Mobile Web
    • Edited by Ian Haynes Thursday, January 19, 2012 9:21 AM
    Thursday, January 19, 2012 9:12 AM
  • Preloading CSS and javascript files is automatic - well, it depends on browser and server settings.

    When a file (any file) is downloaded it is cached on the PC. Internet Explorer uses Temporary Internet Files for the cache.
    When the next page requested, the cache is used to get files that have already been downloaded, so they do not get downloaded again.

    Preloading means download before the file is used - CSS is used immediately as the page renders, there is no point in preloading CSS files.

    Browser and Server settings:
    In IE (FireFox and other browsers have equivalents) can be set to cache files, or to not cache files, as they are downoaded. If the setting is to NOT cache files then the "preloading" described above will fail, and every file will have to be downoaded for every page. There is no effective way to preload CSS.
    You (as a web page author) cannot change browser settings.
    The server can be set to send a HTTP header that expires pages and files very soon after they are downloaded, this means tht the cached files will not be used. You (or your host) can ensure this header is not sent. (In practice, this header is rarely used except for some https pages.)


    Ron Symonds
    Microsoft MVP (Expression Web)

    www.rxs-enterprises.org/fp
    Thursday, January 19, 2012 9:20 AM
  • Interestingly the Chrome Dev tools tell me the page takes about 5.5 seconds to fully load, although visually it loads in less than 2 seconds on IE9. The various external widgets from Google, Sharethis, Addthis etc all add to the time.

    However it does highlight that time can be saved by minimising image sizes.


    Ian Haynes

    EW - V4 Add-Ins
    EW - Resources, hints and tips
    EW - Design for the Mobile Web
    Thursday, January 19, 2012 9:55 AM
  • The page loads fast enough for me too.

    One recommendation: remove references to files that aren't found as waiting for them takes relatively a lot of time. E.g. your home page refers to widgets.js twice, and it's not found.

    Thursday, January 19, 2012 11:15 PM
  • I don't get the reasoning...I want the home page to load faster, so I'm going to create another page that has to load first and preloads all the stuff that the home page needs so that when the visitor goes through the extra trouble of waiting for a page he doesn't need and clicking a button to go to the home page (which isn't really the home page) it makes the home page appear to load faster (although it's now about 15 seconds later than it would have been if I hadn't put the visitor through all that).

    What you're talking about is a splash page(or an interstitial page if you wanna be high-falutin'), and they went out with high button shoes and spats. Or at least when Clinton was still in office.

    I don't see that the page is noticeably slow. It's no speed demon, but nothing out of the ordinary (I'm getting 6Mbps service at the moment). I wouldn't worry about it.


    Comic Sans walks into a bar. The bartender says, "Get out! We don't serve your type."
    Friday, January 20, 2012 12:20 AM
  • I agree with Bill.  What you are doing makes no sense.  (Now, as for the speed of the current page ... since the OP has posted before and I've visited the page before, I'd have to clear my browser cache to see the real speed, which I won't trouble to do.  :)  )
    Friday, January 20, 2012 12:33 AM
  • I guess the answer is nearly there, I thank all the above members for their replies. I have been given the following link to see my page speed and results, and find it hard to progress the items in the red zone. ( I don't understand lots of it) http://gtmetrix.com/reports/www.drachsi.com/iOnz2Vlf

    Again thanks for your time

     

    Drachsi

    Sunday, January 22, 2012 5:47 AM
  • I guess the answer is nearly there, I thank all the above members for their replies. I have been given the following link to see my page speed and results, and find it hard to progress the items in the red zone. ( I don't understand lots of it) http://gtmetrix.com/reports/www.drachsi.com/iOnz2Vlf

    If you don't understand it, why worry about it? Seriously?

    Looking at the top three items (the red, "maximum impact" items) shows the first to be "Defer parsing of JavaScript." Right, and when you expand that item you find that most of the stuff referenced is external to your site and is associated with Google and with various sharing icons. You don't control that stuff, so don't concern yourself with it.

    That second one, "Leverage browser cache," well, if you google it you find that you need to send an extended expiry date in the HTTP header for those resources. If you're really desirous of addressing that, google "leverage browser cache," and you'll find all kinds of interesting, esoteric htaccess information. You go right ahead with that. It's not something I'm that concerned with.

    Finally, you've got "Combine images using CSS sprites." Unh, huh. Looking at those image sizes—7 bytes, 56 bytes, 322 bytes... all you're saving is the time for the HTTP requests. Sorry, not high on my list of urgently needed optimizations.

    For large, highly graphical or data-driven sites, such optimizations can add up when considered cumulatively. For the average small business site, not so much. And when considering things over which you have no control, such as when external scripts are parsed, I'd say "much ado about nothing."

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    • Edited by paladyn Sunday, January 22, 2012 7:23 PM
    • Marked as answer by Drachsi Monday, January 23, 2012 6:11 AM
    Sunday, January 22, 2012 7:21 PM
  • Well, that gtmetrix site shows a page size of 634KB. That's pretty big for a simple page. If you want the page to load faster, start dumping stuff (100KB is a goal many people strive for.

    You can't have both--a fast page and a large page file size. I'd start by dumping all the social network stuff--Is that what business-to-business sites really do? Is that what business people have time for? Does that mean anything to them? Especially when you have multiple ways for each of them (which adds to the overhead).


    Comic Sans walks into a bar. The bartender says, "Get out! We don't serve your type."
    Sunday, January 22, 2012 9:07 PM
  • What Bill said. Besides the graphics page weight those social buttons add, note that addthis, sharethis, and Google's plusone between them comprise ten out of the sixteen javascripts reported in the aforementioned "Deferred parsing" stat, and that those represent 450.7 kB out of that 643kB total page weight! So, not only is deferring their parsing beyond your control, they represent 70% of the page weight that is causing it to be so slow in downloading and rendering!

    Just out of curiosity, whatever gave you the idea that having all that social networking cruft on your site was a good idea? Seriously, I'd like to know who is promulgating it.

    cheers,
    scott


    Please remember to "Mark as Answer" the responses that resolved your issue. It is common courtesy to recognize those who have helped you, and it also makes it easier for visitors to find the resolution later.
    • Marked as answer by Drachsi Monday, January 23, 2012 6:10 AM
    Monday, January 23, 2012 2:42 AM
  • I have made some changes and the page now loads in 2.3 seconds and is 252KB.

    Thanks again everybody for your help, support, ideas and comments.

     

    Drachsi

    Monday, January 23, 2012 6:52 AM