Grow your CSS skills. Land your dream job.

[Solved] Speed up load time on wordpress blog

  • # September 17, 2009 at 8:00 am

    Hi,

    After going round a few forums asking for reviews of my site, one problem keeps coming up. The load time of my site is too slow..

    How can I speed this up?

    I just recently added a 3D map to my site which contains the following in the header

    Code:

    ";

    } else {
    if (externalLink == "no") {

    div.innerHTML = "

    " + titlename + " - " + short_summary + "

    ";
    } else {
    div.innerHTML = "

    " + titlename + " - " + short_summary + "

    ";
    }
    }

    b.setContentDiv(div);
    ge.setBalloon(b);

    // Set a timeout function to close the InfoBalloon after 6 seconds
    // window.setTimeout(function() { ge.setBalloon(null); }, 6000);

    });

    return currentPlacemark;
    }

    function failureCB(object) {
    alert('load failed');
    }

    function submitLocation() {
    var address = document.getElementById('address').value;
    geocoder.getLatLng(
    address,
    function(point) {
    if (point && ge != null) {
    var la = ge.createLookAt('');
    // 40000 number being the zoom-to view altitude for those interested
    la.set(point.y, point.x, 100, ge.ALTITUDE_RELATIVE_TO_GROUND,
    0, 0, 40000);
    ge.getView().setAbstractView(la);
    }
    }
    );
    }

    Am guessing this will slow the page load time alot ?

    Also this contains something like 70 validation errors..

    Am thinking of getting rid of this as I don't fancy attempting to fix the errors and to view the map you need to install a google plugin which I doubt strangers would do just to view it.

    any other things that could be slowing down my page?

    Thanks

    http://www.leehughes.co.uk

    http://www.leehughes.co.uk/3d-route/

    thanks

    # September 17, 2009 at 10:51 am

    It’s bad for two reasons:

    1) As you’ve noticed, it totally slows the website down, and

    2) Some people (probably the majority), won’t have the Google Earth plugin (like me, for example). So I waited and waited only to have something tell me that I couldn’t view it.

    If you want to have it, put it on a special page that people can go to, certainly not the index.

    # September 17, 2009 at 10:55 am

    Hi,

    Due to the way the code is done.. I have to put it in the header which basically means that every page that is viewed would have to scan through this code..

    Just wondering how much this would slow down the page..

    Looks like I will have to loose it :(

    # September 17, 2009 at 10:57 am

    Nay nay.

    Just create a new template specific for the page that will have the map on it. Only put the JS in that template.

    # September 17, 2009 at 11:00 am

    Am such a idiot!!!

    # September 19, 2009 at 11:56 am
    "leehughes" wrote:
    Am such an* idiot!!!

    lol.. dont blame yourself.. even I never thought of it that we could put the required javascripts in the respected templates rather than including them in the header! Thanks a ton TheDoc! ;)

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".