1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Advice on website load time - speeding it up!

Discussion in 'HTML & Website Design' started by Julie McElroy, Mar 14, 2013.

  1. #1
    I am trying to get my PR 2 websites up to a PR 3, so I am doing some tweaking. I know I could always do more SEO and more consistent content. But one of the things that comes up when I test the sites is the slower load time. I have done many of the things suggested, but I thought I'd present the question here to see if maybe there is something I am missing. I just moved my pictures to MAXCDN to get the pics and video off my server, but I am wondering: What other things can I do to speed up load time?
     
    Solved! View solution.
    Julie McElroy, Mar 14, 2013 IP
  2. dlb

    dlb Member

    Messages:
    203
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    35
    #2
    I think using a CDN is the biggest step you could have taken. I was going to suggest slow load times can be related to cheaper, over-sold web hosting packages but that is irrelevant.

    Beyond what you have already done, you could create and use a spritesheet for your layout, optimise images and media directly or take a look at how much javascript you are using. It's very easy to get carried away with jQuery plugins and the like...
     
    dlb, Mar 14, 2013 IP
  3. creativewebmaster

    creativewebmaster Active Member

    Messages:
    654
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    78
    #3
    May be below details help you.
    - Optimize the images
    - Optimize the jquary
    - Optimize video
    - Do not use third party screen or data into website that take a time to load.
    - User google font face
    - Remove unnecessary code and jquary
    - Coding style should be semantic
     
    creativewebmaster, Mar 14, 2013 IP
  4. greboguru

    greboguru Member

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    Is the content you're displaying static or do you create it dynamically on a per page request? If its dynamic, then you could look at how you create it - optimise code / SQL queries etc. Could you cache some of the content or all of it? Just a thought :)
     
    greboguru, Mar 15, 2013 IP
  5. Julie McElroy

    Julie McElroy Active Member

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #5
    The coding is the part I only know a little bit about. I have done some basic HTML and CSS, but generally, I try to avoid it because I know I can really do some damage. LOL
     
    Julie McElroy, Mar 15, 2013 IP
  6. Julie McElroy

    Julie McElroy Active Member

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #6
    What about XML map - is there a plug in that does multiple things, I rather not add another plugin and certainly don't want to mess too much with the code.
     
    Julie McElroy, Mar 15, 2013 IP
  7. #7
    XML maps is hoodoo-voodoo and has NOTHING to do with speeding up a blasted thing. In general ANYTHING that amounts to 'throwing more code at the problem' is NOT going to speed things up.

    Likewise I'm not sold on CDN's as my experiences with them is typically that they're needlessly complex, NOT as fast as a decent hosting system unless your site is absolutely and insanely massive (on the scale of something like say... ebay or google) -- for 'normal' websites it's a waste of time and money that could be better used to just get better hosting. MOST of the benefits if you're on a decent server can be garnered just by setting up a subdomain to handle static files, perhaps with a separate lightweight server software meant for static delivery.

    Really though if you are having page speed issues, 99.99% of the time someone comes in with this it's because they just have too much pointless garbage like javascript for nothing, endless pointless separate images doing the jobs of single files, presentational images that add NOTHING of value to the page in terms of delivering content, and in general have just slapped together a bunch of off the shelf software without cleaning up the crap most of them come with. (Wordpress and Joomla are notorious for this).

    The core techniques for making fast sites are, to a developer at least, reasonably simple. You set a template size limit (Mine is 72k in 12 files ideal, 144k in 24 files upper limit), you keep the number of separate files to a minimum, you only use javascript to add functionality instead of goof assed animated crap that just gets in the way of the user,

    Is there a specific site you are referring to? Do you mean the one in your signature? Here, lemme do a code/design audit on that link just to give you an idea what I'm talking about.

    Ignoring the inaccessible fixed width layout, inaccessible fixed metric (px) SERIF fonts, and all the other "how not to design a website" issues with the page, the FIRST thing I noticed is the ridiculous amount of time the domain lookup and initial server response took. That right there means your hosting is probably a hefty chunk of the problem.

    Trying to pull up the page's information in firefox also seems to take forever, I suspect there is likely a file or two that aren't resolving... lemme pull up dragonfly and look at the waterfall to see what's happening... Oh yeah, your host is TRASH. 10.5 SECONDS of 'waiting' for the server to even send the document means the server is trash. Likewise the 5.7 seconds waiting on the jquery garbage really isn't helping matters either.

    ... While that site isn't THAT heavy (it's only double my upper limit and not TOO many requests) the wait time on the hosting is basically killing it's usability. That said, it could be lightened a good deal by swinging an axe at the javascript for nothing, getting the number of separate files (especially the three stylesheets with no media types) under control, etc, etc...

    But if you are referring to that site -- your problem is crappy hosting. It's taking 20 seconds to load here when in terms of the number of files and total size, it shouldn't take more than half a second.
     
    deathshadow, Mar 15, 2013 IP
    Julie McElroy likes this.
  8. Julie McElroy

    Julie McElroy Active Member

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #8
    WOW!! @DeathShadow - thank you so much!!!

    That is one of my sites and I was also looking at my travel site.

    All of my sites are on HostMonster, including my writing site - essentially these three that I use and a few more that I have not been active on, including a blogging site I am trying to sell here on DP! Switching would be a project (for me as a non-techie), but may be worth considering. ?? Any recommendations - you can PM , too. If the hosting can solve a good amount of the problems, I would be willing to try and switch... as long as I had a step-by-step guide - ;)

    EDIT: OR, is there some changes I could just ask my hosting company to do instead of switching?
     
    Julie McElroy, Mar 15, 2013 IP
  9. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #9
    That travel site has significantly more issues. (It too has the accessibility problems as well as the loading times). At 155 separate files totalling over 3.72 megabytes, and a page load time here measured at over a MINUTE, the slow hosting AND massive page size are working together to make that site barely usable from here.

    A LOT of it can be blamed on the endless "js for nothing and your scripts for free", a MEGABYTE of javascript in 33 separate files is ridiculous. When files are requested from a server the request and response are called 'handshaking' -- which takes an amount of time roughly equal to three times the 'ping time' to the server; which real world can run anywhere from 50ms to two full seconds. From here my ping-time to that server is around 89ms; pretty good... that means a handshake time 'real world' of around 270ms, let's call it 200ms which is the 'generally accepted' average due to the browser in SOME cases being able to open multiple connections. 33 files at 200ms apiece is 6.6 seconds overhead BEFORE data even starts being transferred. You get a bad connection or a choked out connection limit like say... at Panera Bread or Starbucks or any other connection shared by lots of users (work even) and that could be a full two seconds with no 'overlap' (multiple simultaneous connections) each, resulting in the scripting alone taking people at places like that over a MINUTE... again not even counting data transfer time!

    It's part of why I'm not a fan of things like silly animated rotating banners and other 'scripting for nothing' - and why I set much more realistic limits of what can be done on most websites. A normal site like that I would probably NEVER allow more than 30k of scripting. PERIOD. This automatically precludes using ANYTHING based on jquery, but it also means the page will actually load TODAY.

    The 52 separate images is a bit of a head scratcher, since by my count there are only half that many actual content images. To be frank though, there's too much on the main page in the first place, which is why I'd gut down or throw out at least HALF of what's in there for content and associated images. Likewise the massive background image you can barely even see on the page at 'normal' resolutions is just pointless bloat... it also doesn't tile very well at 1920+ resulting in it being ugly too. There's a reason you don't see that type of stuff on 'real' websites like Amazon, e-Bay, Craigslist, Google, etc, etc...

    It's also suffering from the server too -- and a LOT of the things being called are being redirected 304. Redirects take extra time... oh, and on both pages there are files that are outright 404... on the travel page hqdefault.jpg doesn't exist, on the other site jquery.shareaholic-publishers-sb.min.js doesn't exist... the one on the travel page is saying 404 nice and quick (56ms), but on the writing blog that jquery.sharaholic file is taking three and a half seconds to report 'not found'! (that's bad!). That can actually hang the render if there's scripting inlined after it that might be calling it.

    oh, if you want to see all these numbers for yourself, if you view your page in Opera, pull up the right-click context menu and hit 'inspect element' it will open up the developer tools (aka Dragonfly), in Dragonfly click on 'network' and hit the refresh button in the center of the network page. It will show you all the file requests, responses and load times. There are two buttons that let you swap between 'details' and 'waterfall' -- the latter showing how long it actually takes to load the page. (they're right below the 'make request' tab). You can get similar information using the Firebug extension for Firefox. To get more accurate results under the 'network options' tab you can disable caching, giving you the equivalent of a 'first load' scenario. (which is what most first time visitors to your page will get). I prefer Opera's version just because it's built into the browser -- like everything else I rely on daily... No need to hunt for extensions.

    The markup of the travel page is also similarly flawed -- there are a LOT of unnecessary DIV and classes that can make the scripting run slower (due to a larger more complex DOM), but that's typical of what turdpress vomits up and has the cojones to call a website. It takes a LOT of hard work to gut down what wordpress WANTS to do into something useful -- which is why I gave up working with off the shelf CMS systems ages ago. All things like Wordpress or Joomla do is TRICK people into thinking they can have a website -- which means it's fine for goofy little personal pages, but really has no business being used for anything you want to do seriously as a business. Case in point, this is using 50k of markup to deliver less than two dozen content images, one object embed, and 4k of plaintext -- most likely four to five times as much code as should be used for such a layout. (ESPECIALLY given it's an inaccessible fixed width wreck, which usually means even SIMPLER design). Likewise the massive 230k of CSS in 12 separate stylesheets is ... absurd. An entire forum software can be skinned in a sixth that or less; there is NO reason for there to be so much... garbage CSS. Quite literally for a page like that I wouldn't allow it to have more than 30k of scripting, 20k of markup and for the ENTIRE site there is no reason for it to be using more than 40k of CSS... totalling around ... 3 files. Figure in the twenty or so images at it would be right at that 24 file limit I mentioned.

    ... and again, the scripting is really the greatest evil here in terms of speed -- when you are loading 52 images (I'm still thinking "for what"? on that) and the total size of them combined is a third the size of your SCRIPTS, there is something terrifyingly bad with how the site was built. (I would suspect just slapping together off the shelf bits and pieces and overuse of 'plugins').

    Really that other site would be slow on ANY hosting due to the size, sheer number of files, needless complexity, and pointless scripting. Combining it with a slow host and... bad things tend to happen.
     
    deathshadow, Mar 15, 2013 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #10
    Oh, on switching hosts that's usually not TOO hard, it just involves copying all the data over, then pointing the domains at the new location. The only part that can be tricky is moving the SQL tables - but not too horribly so if you don't have too much data. Quite often most hosts will give you access to phpMyAdmin which lets you fairly easily backup and restore mySQL tables with a minimum of muss or fuss so long as the files aren't too large. (they get above a certain size and you'd have to use command line tools to do it).

    As to dealing with the existing host, ASK! Never hurts to ASK if they can move you to a less crowded server or help you optimize to reduce your impact. MOST LIKELY though you are on a cheaper plan that they oversold the number of people they stuff into a server. Shared hosting always kinda sucks that way. A VPS or even better a dedicated host is often a better solution, but that can run into some serious money.

    Though to be frank, I'd rather pay $60 to $100 a month for a bottom end dedicated server, than deal with the nonsense that is a VPS or shared hosting... but I tend to like to manage my own and tweak settings that shared hosts would never let you near -- like the cache sizes in mysql.ini and php.ini.

    In a lot of ways that's why the people who can admin a server properly and optimize a server can make even bigger bucks than the people who make the stuff hosted on said hardware.

    I should know, when I was doing this stuff professionally (I'm now several years retired) I made an art form out of making websites that were choking out multi-core Xeon servers with several gigs of RAM run smooth as silk on cheap single core P4's with 2 gigs, just by making rational software choices, gutting down the site code, and knowing how to configure, analyze and optimize the server settings. Admittedly I learned all about doing such things in the mid '90's when I was running a 5,000 user database off a 486DX-50 with only 16 megs of RAM on netware 3.12. (real 50, not a DX/2)
     
    deathshadow, Mar 15, 2013 IP
  11. Julie McElroy

    Julie McElroy Active Member

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #11
    Thanks again! Most of this over my head! My next question is how much would you charge to fix some of this crap? Due to serious medical reasons, I am not working right now, so I am on a very limited budget, but I figured I would ask if 1) you would be willing and 2) you would affordable. The travel site is using a theme, maybe that is some of the problem. Anything you can do, I would be super grateful!! I would like to fix this!!!
     
    Julie McElroy, Mar 15, 2013 IP
  12. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #12
    So I guess there's a use for my old (ca. 1993) laptop after all. Have to cram it all into 5 megs of RAM, though. :) Now where did I put those Novel disks?
     
    Rukbat, Mar 15, 2013 IP
  13. dlb

    dlb Member

    Messages:
    203
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    35
    #13

    This needs to be carved into the moon for all to see. A week ago yesterday (friday), I walked away from my job as a web developer with a Web Design and SEO agency because the amount of garbage we were putting out, collectively, just didn't sit well with me. I told the boss that we were putting out junk websites and he didn't care. The rise of websites like Themeforest just compound the problem. I don't know if anyone has used that site much (our agency used it for EVERYTHING), but some of the WordPress themes are over 50mb to download. The smallest Themeforest template I have on my laptop at the moment is 3.3mb. This is ridiculous. Beyond ridiculous. It's like dumping rubbish next to a school, shooting garbage out into space, etc etc... Unnecessary littering.
     
    dlb, Mar 16, 2013 IP
  14. Julie McElroy

    Julie McElroy Active Member

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #14
    But, for people who are not web designers and can't afford to pay someone to maintain their website (i.e. Freelance writer), what is the best option if not WP??
     
    Julie McElroy, Mar 16, 2013 IP
  15. Julie McElroy

    Julie McElroy Active Member

    Messages:
    119
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    53
    #15
    have not heard back from you DeathShadow, i am guessing not for hire? =)
     
    Julie McElroy, Mar 16, 2013 IP
  16. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #16
    I too am... unavailable for medical reasons -- I've actually been retired for close to six years now. Had to close up shop due to health issues, slowly weaning my clients off support (I've still got two or three I've not completely severed ties with). I still keep a hand in working on my own stuff because I can't just sit around with my thumb up my backside, and I like to pass on what knowledge I have from what is rapidly closing on three decades of programming.

    IF I were to take on such a project, it would have to be on the understanding that due to my health I might drop off the face of the planet for a week or two, and I have non-24 sleep-wake syndrome so it's not like I can 9 to 5 with everyone else every day. Why I don't really think it's fair to clients for me to take on new ones right now.

    I also think that the 'quality writing' website could be saved from it's doldrums, but the travel one needs to be COMPLETELY thrown in the trash and started over from scratch, quite possibly with a CUSTOM solution, back when I was doing this I'd probably have quoted you a grand or so. That's what a site like that SHOULD cost you is anywhere from $750 to $1500 USD to be done 'properly'.

    Unfortunately there are a lot of fly by night sleaze out there who will charge you that for what you basically already have. There WAS a guy I'd point you at, but he's been dead for three years. There was ANOTHER guy I'd have pointed you at, but he closed shop and joined the US Navy... You can see where this is going. Honestly, MOST of the people who seem to have a clue, and bothered learning to do things properly, end up so pissed off and burned out, they leave the industry in a huff after realizing they could make more money flipping burgers than doing this... and even if it's not more money it's a hell of a lot less frustrating. ESPECIALLY after dealing with all the sleazeball scam artists who dominate the industry and piss out site after site after site of inaccessible trash preying on the ignorance of the average site owner... said owners sitting there wondering why their sites are going nowhere and are more expense than investment -- though to be honest, ALL websites should be treated as expenses. A concept lost on the re-re's who think you can make money with websites without your own product to promote or a quarter million startup money to stock your own warehouse.

    Shame I've not finished my own CMS that's meant to burn down the big boys and piss on their ashes, but considering I've spent the past three weeks doped up on enough Vicodin to kill Gregory House, feeling like I was popping Pez not painkillers for all the good they were doing -- not exactly a shocker I've not felt like working on it. (This is my first pain-free drug-free week -- I'm finally eating again; was getting scary since I lost 30 pounds in 20 days)

    Of course, that's probably why I've been a bit more mellow in my posts than usual.
     
    Last edited: Mar 16, 2013
    deathshadow, Mar 16, 2013 IP
  17. gregdbowen`

    gregdbowen` Member

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    33
    #17
    Hi Julie, you can test your optimizations here: https://developers.google.com/speed/pagespeed/insights

    For sure you want to get your image sizes low and be careful how much video you add. You also want to minimize the number of plugins, especially those that use Javascript.
     
    gregdbowen`, Mar 16, 2013 IP