Web Analytics Made Easy -
StatCounter website loading too slow - CodingForum

Announcement

Collapse
No announcement yet.

website loading too slow

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • website loading too slow

    How long it's suppose to take for a website to load? I am having problems with a project i am handling, i feel that the site is loading too slow. Do you think optimizing the site and applications have an enormous effect on the latency experienced by the user? Is it also true hosting infrastructure decisions and server configuration can also dramatically reduce latency? Do you have any tips or solutions on how to solve website latency problems?

  • #2
    Normally if a site is slow it's more the fault of the deign and development than it is the hosting. There are... practical size limits that should be practiced in terms of both file sizes and the raw number of separate files, that a LOT of the "sleaze it out any old way" methodology used by people using trash like turdpress, bootcrap, and jQuery just flat out ignore. Whilst certainly a site can be slow because of hosting, the reason as to WHY that hosting ends up slow is often the fault of the developers themselves.

    So... how big is the page overall? Realistically unless it's an actual image gallery there's no legitimate reason to be breaking more than 72k for the bare template without content -- that's HTML + CSS + SCRIPTS. This is why "frameworks" like bootstrap, yui, jquery, etc, etc, are bad as you end up at 100k or more for each of them before you even start coding your page; EPIC FAIL. Your presentational images should also be kept small since they're presentation -- not content. Massive space wasting full size images are a giant middle finger to speed, accessibility, and usability -- instant stress creators for your poor overtaxed hosting.

    How many separate files is the page built from? Every time a user requests a file for a page, there's what's called a "handshake" between the user-agent (browser) and the server. This request is a back-and-forth at LEAST three times that takes about the same amount of overhead EACH WAY as a ping to the server... so if you have a 300ms ping time to the server, that's almost a full second FOR EACH FILE regardless of the speed of the connection at either end! Because browsers can request multiple files at once (typically 8's the limit), the 'rule of thumb' is that the first eight files are "free" as they're simultaneous, and for normal HTTP every file past that first 8 takes anywhere from 200 milliseconds average to a second or more worst-case. To reach that worst-case the server either can't handle that many requests at once from high traffic, or there are too many people locally sharing the same connection.

    For example, if you have a page that's loading 18 files total in HTML, CSS, JS and images, that's considered to have a likely average of two seconds of overhead and a worst case of ten seconds. If however you have a page that's 68 files total, that's a ugly average of 12 seconds and a worst case of a minute or more! As such if said site is a train wreck built from several hundred separate files, OF COURSE IT'S SLOW! Sadly the way most people just plop endless separate scripts and stylesheets into pages, much less presentational images with ZERO attempt at using file-count reduction techniques such as the incorrectly named "CSS Sprites" -- painfully slow sites doomed to failure are becoming more and more commonplace. See the ineptly developed trash the scam-artist at the various template whorehouses such as Themeforest or TemplateMonster try to dupe people into thinking can be turned into legitimate websites -- it's all little more than nube predating scam-bait.

    Said times above being for a cache-empty first load, but if the site is really big and poorly optimized in terms of leveraging cache, cache flushing and size limits could still send you back to that hell on every page-load.

    Another thing to look at is the "code to content ratio" or CTCR. How much HTML is there on the page compared to the amount of raw plaintext? Bloated markup takes longer to parse, and can delay scripting and style from loading. Excessive amounts of static scripting or static style (the latter having NO business in your HTML) can hang the render and fail to leverage caching models making sub-pages and subsequent visits slower.

    How many DOM elements (tags) are present on the page and how are they nested? The more "DIV for nothing" or "pointless wrappers" such as HTML 5's new uselessly redundant "structural" tags can actually make any JavaScript present run slower on operations such as getElementById or getElementsByTagName -- much less if the code tries walking the DOM. This habit people have of slapping in endless pointless DIV any-old-way into the markup can greatly slow the render time, and have a horrific impact on the already bloated and useless scripting that's all hot and trendy.

    In terms of the scripting, do you know what a "blocking" script is, and how many do you have? Scripting changing the markup should be done with a eye-dropper, scripting only elements/tags have no business in your HTML to start with, and if a massive script HAS to load before rendering is done, put it before </body> instead of inside <head>.

    If you're willing to share a link, I could give you a proper breakdown of the site. Be warned I don't sugar coat it with such analysis because slapping the rose coloured glasses on your head and leading you down the garden path to sing Kumbaya around the drum circle isn't ACTUALLY helping. If you're doing this as a business you should be able to handle a little harsh language, and if you can't, you likely won't last real long in real business.

    There's a LOT of sloppy practices, bad advice, and sleazy nonsense that people get deluded or duped into using -- and all of it seems to exist just to put the saddle on people and take them for a ride. Sadly they use marketspeak double-talk to make everything sound shiny, happy, and rosy when all they're really doing is blowing smoke up your backside using terms like "easier", "Faster", "more productive" and so forth, when in fact and practice the result is the exact opposite of those claims.

    PARTICULARLY if you have to clean up the resultant mess because the result is an agonizingly slow mess that makes half your users bounce for something faster, and an accessibility disaster that tells the remaining half where to stick it.

    Gets even worse when the most common answer you'll get is to just throw more hardware at it, instead of the proper approach of dragging it 'round back o' the woodshed, putting a 12 gauge to the back of its head, and putting it down like Old Yeller... sadly for many, MANY sites you want to actually fix speed and accessibility issues, starting over from scratch is the only REAL answer, everything else is like trying to bandage a sucking chest wound from a .50 Barrett with a tampon and duct tape.

    Again though, I'd have to see the actual site in question to tell you how bad it REALLY is... most of the above is simply based on my experience whenever someone asks this question as it is almost ALWAYS the exact same problems over and over and over again. Taking slow sites that are killing their hosting and making them run at a fraction the hosting cost was kind-of my specialty when I was doing this stuff full time -- and it's almost ALWAYS the exact same code bloat, PSD jockey "gee ain't it neat", and sloppy framework nonsense that's the cause.
    Last edited by deathshadow; Oct 7, 2016, 01:32 AM.
    Walk the dark path, sleep with angels, call the past for help.
    https://cutcodedown.com
    https://medium.com/@deathshadow

    Comment


    • #3
      Originally posted by Lavone Dana View Post
      How long it's suppose to take for a website to load? I am having problems with a project i am handling, i feel that the site is loading too slow. Do you think optimizing the site and applications have an enormous effect on the latency experienced by the user? Is it also true hosting infrastructure decisions and server configuration can also dramatically reduce latency? Do you have any tips or solutions on how to solve website latency problems?
      Slow loading of website can be cause by multiple factors but a latency can be an issue too with all internet connections and networks. Tracking dns performance can help catch problems immediately and likewise can fix lag.

      Comment


      • #4
        employ the scientific method to diagnose problem.

        start off with a simple .html page, test load time. this shouldn't take long at all, if so, it's probably your host site. try a different host site but same .html page.

        you change one variable at a time and test each situation to find your problem.

        Comment


        • #5
          The website speed plays a very important role in driving more traffic to a website. The users do not use a website, if the website loads slowly. If you want to improve your website loading time, then you need to use the following tips:
          1. Reduce the http requests: Web page’s load time is spent downloading different parts of the page i.e.; images, style sheets, scripts, Flash, etc. An HTTP request is made for each one of these elements, so the more on-page components, the longer it takes for the page to render.
          2. Reduce the sever response time: Reducing the sever response time can also improve the website speed.
          3. Enable compression: Compression reduces the bandwidth and http response time of the webpages.
          4. Enable browser caching: When you visit a website, the elements on the webpage are temporarily stored in the cache and the next time we visit the website, the browser load the page without having to send another HTTP request to the server.
          5. Minify Resources: There are different CSS, HTML and java-script compressors that can be used to compress the code. Adding unnecessary piece of code can also effect the loading time of the website
          6. Optimize images: oversized images takes too long to load. So, it is better to add small images in the website
          7. Reducing the number of plugins: Using too many plugins can reduce the website speed and it can cause security issues and crashes in the website.
          Classic PDF Editor|| Best PDF Converter

          Comment

          Working...
          X