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.

Page load speed problem

Discussion in 'HTML & Website Design' started by Lukasz Jedrak, May 14, 2015.

  1. #1
    Hi all. I have a problem with page speed of my website. I have gzipet my site also im using laverage casch but still its take over 3sec to load my site naszastrefa.co.uk
    Any sugestions? I have spend like 3 days and cant find any solution for this;/
     
    Lukasz Jedrak, May 14, 2015 IP
  2. braulio

    braulio Active Member

    Messages:
    70
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    95
    #2
    braulio, May 14, 2015 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Well, first thing I'm noticing is that the endless pointless scripttardery makes it so none of the tools I usually use to determine a sites size can actually even RUN... oh wait, the old web developer toolbar "view document size" is working on this...

    You've got THREE MEGABYTES in 93 separate files -- OF COURSE IT'S SLOW!!! The raw number of separate files ALONE results in a best case first-load of 5 seconds, a real world average of 17 seconds, and a worst case scenario of two minutes or more.

    Breaking it down, the 24 separate scripts totalling over 800k is one of the biggest contributors to that page being a train wreck, but the disastrous 19 separate stylesheets and 436k of CSS basically means whoever made that page doesn't know enough about CSS to have been making a page... since even an entire forum software has NO legitimate excuse to be wasting more than around 48k of CSS in two files per media target other than developer ineptitude.

    The 48 separate images coming to 1.6 megabytes probably doing a quarter that's job is likely equally part of the problem.

    Even the markup is rubbish -- you've got a crazy 128k of HTML being used to deliver 11k of plaintext and by my count 32 actual content images -- that's easily four to six times the amount of code needed for such a simple page; particularly when said page is LACKING anything remotely resembling accessible design, semantics, logical document structure, or any of the dozens of other things that should have been done long before layout was even applied to it.

    Of course, this is entirely typical of taking sleazy shortcuts and letting them delude you into thinking that makes a website -- turdpress, opengraph nonsense, overstuffed keywords meta thanks to the mouth breathing idiocy known as the "SEO Pack" plugin, static scripting in the markup, static style in the markup, endless pointless DIV, ID's and classes for NOTHING, screen layout being sent to "all"... It's just another jacked up laundry list of how NOT to build a website.

    Seriously, if you don't know what's wrong with this:
    <a class="ubermenu-responsive-toggle ubermenu-responsive-toggle-main ubermenu-skin-black-white-2 ubermenu-loc-header" data-ubermenu-target="ubermenu-main-13-header"><i class="fa fa-bars"></i>Menu</a><nav id="ubermenu-main-13-header" class="ubermenu ubermenu-nojs ubermenu-main ubermenu-menu-13 ubermenu-loc-header ubermenu-responsive ubermenu-responsive-default ubermenu-responsive-nocollapse ubermenu-horizontal ubermenu-transition-shift ubermenu-trigger-hover_intent ubermenu-skin-black-white-2 ubermenu-has-border ubermenu-bar-align-full ubermenu-items-align-left ubermenu-bound ubermenu-disable-submenu-scroll ubermenu-sub-indicators"><ul id="ubermenu-nav-main-13-header" class="ubermenu-nav"><li id="menu-item-308" class="ubermenu-item ubermenu-item-type-custom ubermenu-item-object-custom ubermenu-current-menu-item ubermenu-current_page_item ubermenu-item-home ubermenu-item-308 ubermenu-item-level-0 ubermenu-column ubermenu-column-auto" ><a class="ubermenu-target ubermenu-item-layout-default ubermenu-item-layout-text_only" href="http://www.naszastrefa.co.uk/" tabindex="0"><span class="ubermenu-target-title ubermenu-target-text">START</span></a></li>
    Code (markup):
    or this:
    <article id="post-1341" class="group post-1341 post type-post status-publish format-standard has-post-thumbnail hentry category-north-east category-wiadomosci category-wielka-brytania">
    Code (markup):
    Do the world a favor, back the **** away from the keyboard and STOP trying to make websites.

    Sorry if that seems harsh, but you've fallen into the trap that is the idiocy known as off the shelf frameworks, off the shelf CMS, and blindly being able to just keep slapping plugins into turdpress in the blind hope it does anything useful. (usually it just makes things worse).

    As I often tell people I would pitch that entire disaster in the trash and start over from scratch if you are SERIOUS about actually having a website. You've been led down the garden path to failure by broken methodologies which is why there is little if anything I'd even think about salvaging from that.

    Bottom line, you've been duped, bamboozled and otherwise deluded into thinking the tools and techniques you've chosen are going to work -- hardly a shock in this day and age of "sleaze it out any old way" and if you REALLY want a fast loading site that's accessible and useful to visitors, you're NOT going to get it with ANY of the "tools" you've chosen to do it! No matter how many ignorant jacktards with their cookie cutter turdpress BS will try and tell you otherwise! -- hence why you have 3 megabytes in 93 files doing the job of half (maybe even a quarter of) a megabyte in maybe 24 files. (I'd cut the number of articles per page in HALF)... with so much over the top scripting for NOTHING that, well... of course it's slow!
     
    deathshadow, May 14, 2015 IP
    Creative Nerd and malky66 like this.
  4. free_mockups

    free_mockups Active Member

    Messages:
    98
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    98
    #4
    I believe you have already tried image optimization, content optimization, cache management & Jquery optimization as well?
     
    free_mockups, May 14, 2015 IP
  5. Creative Nerd

    Creative Nerd Active Member

    Messages:
    78
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    70
    #5
    Totally offtopic, sorry OP.. :) but man, @deathshadow I really love your answers so much you have no idea.
     
    Creative Nerd, May 15, 2015 IP
  6. Franklin Hatchett

    Franklin Hatchett Well-Known Member

    Messages:
    462
    Likes Received:
    27
    Best Answers:
    2
    Trophy Points:
    123
    #6
    Last edited: May 15, 2015
    Franklin Hatchett, May 15, 2015 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #7
    Oh, I figured I should explain WHY so many separate files are bad -- rather than just saying NINETY THREE FILES?!?

    When a website gets a file from the server, it has to do this bit of back and forth called "handshaking" -- the browser asks for the status of the file, the server says yes I have it, and when it was last updated, if it's cached the browser says "nevermind" and if it isn't cached the browser says "ok, send it to me".

    Each "handshake" can take two to four times the time it takes to "ping" your server remotely from the user's location. The overhead of handshaking is usually unrelated to the actual speed of the connection. If you've ever uploaded files via FTP you may have noticed it takes longer to upload 100 separate 10k files than it does a single 1 megabyte file -- that's handshaking in action. (and FTP's handshaking is WAY bigger/bloated than HTTP's)

    Ideally the browser can request multiple files at once but you cannot rely on that -- best case is usually considered 90ms, and you basically have to be sitting on top of the server to get files that fast. The "real world average' typically used is 200ms for every file past the first eight on "first load" -- aka when cache is empty -- so a real world average a page with 18 files would take 2 seconds on "first load", while a 93 file page would take a painful 17 seconds. Lately I've seen people slapping together pages with several hundred files; if you had 208 files that would be an ungodly first-load time 'real world' of 40 seconds.

    But worst case is anywhere from a second to a second and a half for EACH file. While you should never see those numbers on a home connection, you go down to Panera bread or McDonalds to leech their free wireless during lunch rush, and ... well, guess what? that 18 file page now takes ten to fifteen seconds, a 93 file page takes 85 to over two minutes, and a 200+ page file could see almost four minutes JUST in handshaking REGARDLESS of actual connection 'speed'.

    Remember, connection speed is how fast data can be sent once transmission is started, NOT how fast it is on actually REQUESTING that transmission be started.

    Which is why having so many files is bad... there are tricks for alleviating it on return visits or subsequent views (like playing with cache-control headers) but that does you no good if the user's cache is flushed, or overflow occurs removing the oldest files regardless of cache-control settings, or more importantly the first time a user visits you.

    Of course since browser makers are so obsessed with bragging about browser speed, don't you think if the default cache settings were so totally banjaxed that you 'needed' to play those games, the browser makers would change the defaults? :p That's why the "dicking around with cache headers" nonsense things like "Google PageSpeed Insights" obsesses over either trips my scammy sense, or just plain reeks of sweeping bad code under the rug and blindly hoping it fixes things. (which usually it doesn't). Admittedly, I say the same thing about minification/whitespace stripping! If it makes so huge a difference it's worth doing, you've probably done something wrong in your code...
     
    Last edited: May 15, 2015
    deathshadow, May 15, 2015 IP
  8. Lukasz Jedrak

    Lukasz Jedrak Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #8
    Wow guys thanks so much for all those answers. Im gona try it right away. See you in a bit.
     
    Lukasz Jedrak, May 16, 2015 IP
  9. Mohit Arora

    Mohit Arora Greenhorn

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    23
    #9
    Hi Lukasz,
    Try following things:
    1) Use Static Text Wherever You Can
    2) Minimize HTTP Requests
    3) Optimize Your Images
    4) Utilize Browser Caching
    5) Minify HTML, CSS, and JavaScript
    6) Reduce 301 Redirects
    7) Avoid using Render blocking Javascript and CSS in above fold content
     
    Mohit Arora, May 16, 2015 IP
  10. Lukasz Jedrak

    Lukasz Jedrak Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #10
    OMG you guys are the best! From PageSpeed Insights test i have before: mobile 41/100 desktop 54. And now i got: mobile 65/100 desktop 78/100 and im not even try half of all your sugestions! Ok im going back to work (page speed ofc) see you guys in a bit!
     
    Lukasz Jedrak, May 16, 2015 IP
  11. JSinclair

    JSinclair Banned

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #11
    What is the best way to work on Jquery optimization?? I'm having some issues with a site loading slow and I don't know much about the jquery stuff. Thanks for any suggestions!
     
    JSinclair, May 25, 2015 IP
  12. Phil S

    Phil S Member

    Messages:
    60
    Likes Received:
    18
    Best Answers:
    4
    Trophy Points:
    35
    #12
    The best way to optimize jQuery would be to refrain from using it in the first place. People don't understand that it's just another bloated library riddled with the worst web designing practices.

    What annoys me as a developer and an internet user the most is that such practices somehow became a standard, to the point that they're being taught in schools to our naive youth who then talk other people into using that same garbage. Sadly, most teachers who actually have a slight clue about web design (not really a common phenomenon) know that jQuery and all his retarded cousins don't belong to any website, but they're completely powerless about it as they're legally obliged to respect the curriculum they've been handed.
     
    Phil S, May 25, 2015 IP
    deathshadow likes this.