www.webdeveloper.com
Results 1 to 10 of 10

Thread: Combining jQuery script to reduce load time

  1. #1
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97

    Combining jQuery script to reduce load time

    I found out that (after an system update?) IE8 no longer loads the content on my website www.beautifullalaland.com. I guess it has to do with the ridiculous amount of jQuery calls that some of the simple functions requir. I'm a jQuery newbie, been using JS for years but never a library (and never again if you ask me, what a bloody mess).

    Is there a safe way to combine jquery_002.js, jquery.js, jquery_003.js and jquery-1.3.2.js?

  2. #2
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    That's jquery_002.js, jquery.js, jquery_003.js and jquery-1.4.2.min.js.

    Btw, visit a page with a gallery to check functionalities and click next> or <back: http://www.beautifullalaland.com/greenpeace.html
    Last edited by Pris; 08-14-2010 at 09:43 AM.

  3. #3
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    No one?

  4. #4
    Join Date
    Jul 2009
    Posts
    184
    As you are calling those three files(jquery.js, jquery_002.js, jquery_003.js) from one content page, then you could, likely, combine all of your jquery code from those 3 files(copy and paste) onto 1 file that gets called once, instead of 3 calls:3 files on the web server.

    FYI JQuery is absolutely incredible if you stick with it for a bit.

  5. #5
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    Thanks WestWeb.
    Wouldn't the content of that file have duplicate functions, or, aren't those jQuery files older versions of 1.4.2? Excuse my n00b questions.

    And in al honesty, jQuery offers some really cool additions to websites without having to use Flash. Just got a bit annoyed by these stupid issues. I should blame IE instead.

  6. #6
    Join Date
    Jul 2009
    Posts
    184
    Ah yes, I just looked at the content of those files, and to answer your first 2 question's... It looks like there is one old version of the jquery library(jquery-1.3.2) you can probably throw away. File name: jquery_002.js.

    There are 2 other files for JQuery.localscroll and JQuery.scrollto functionality(never tried those myself); it looks like they could be combined without conflicting with eachother: jquery.js + jquery_003.js. It's hard to say, for sure, until you test it.

    After that, you'll be down to 2 calls to the server: one for the JQuery library, and one for the extra functionality on your page, this is good, really.

    It's hard not to get angry when you're having issues with IE. I think this is one of the big reasons I started using JQuery actually.

  7. #7
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    Thanks again, will delve into it later.
    Just found my original post back on tuts9.com, tagged with "bloody mess"

  8. #8
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    Removing the old jQuery JavaScript Library v1.3.2 (jquery_002.js) removes the scroll function of the panels. Combining jquery.js + jquery_003.js works perfectly though!

    Can't test live in IE, so I'll post back later to let you know if it solved the IE mess.

  9. #9
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    Just found this jQuery Firebug add-on, FireQuery. Will test later.

  10. #10
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97

    Unhappy

    I realize it's not done to revive an old thread, but I moved abroad and had some other things on my mind. Back to business now.

    I moved the order of jQuery scripts (found an error through FireQuery) and moved the link to the .css file down to right above the end head tag. Overall this improved the load time of the site tremendously in Safari, Camino, Opera and Firefox.

    The site shows up in IE now, yet definitely not how it's supposed to look. I figured the problem has to do with the class "hyphenate" as the main problem seems to occur with hyphenated texts. Note: I use the same script on other websites without any problem.

    But, as the code is an enormous mess by now I've decided to start from scratch which seems less of a time waster than trying to hack the site into oblivion.
    Last edited by Pris; 02-18-2011 at 09:49 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles