ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How much JQuery is too much?

December 02, 2008 9:41am

Subscribe [5]
  • #1 / Dec 02, 2008 9:41am

    4flix

    88 posts

    I working on an EE site and wanting to use JQuery, but I’m finding a ton of uses for it.  This will be my first site using JQuery and I’m not sure if/what the threshold is when it comes to ‘too much.’

    For example, I want to use the superfish, rounded corners, and possibly the shadow plugins.  Plus the usual show/hide/toggle and some ajax calls.  Is there a general rule for this or am I being too conservative?

    Kevin

  • #2 / Dec 02, 2008 9:49am

    Mark Bowen

    12637 posts

    Hi Kevin,

    I would possibly say that it’s not so much “How much” but more will the site still work with Javascript disabled which is more important.

    Obviously placing every single spinning whizzing jQuery effect on a page could very quickly give a headache to lots of people but as long as you use it tastefully and ensure that the site still works without Javascript enabled then you will probably be on to a good thing 😊

    Hope that helps a bit.

    Best wishes,

    Mark

  • #3 / Dec 02, 2008 11:17am

    Stephen Slater

    366 posts

    Since the scripts have to be downloaded, pay close attention to their file size and how it affects the initial load time.  Save on file size by using compressed versions of the scripts.

  • #4 / Dec 02, 2008 8:36pm

    e-man

    1816 posts

    The thing to consider is this: If all you have is a hammer, everything looks like a nail 😊

    I love (and use jQuery) myself, but sometimes less is more; always make sure that your site still works with JS turned off i.e. without the bells and whistles.

  • #5 / Dec 02, 2008 10:18pm

    grrramps

    2219 posts

    ...always make sure that your site still works with JS turned off i.e. without the bells and whistles.

    Does anyone have any stats on what percentage of users (varies according to type of site, naturally) run their browsers with Javascript turned off?

    I wonder if it’s worth worrying about. Some jQuery plugins will degrade nicely, others just don’t (can’t?). Is it worth the effort? A similar issue exists when creating a site that runs valid XHTML and CSS. MSIE 5 and Netscape butcher standards-compliant sites, and often, the effort to create a site to fit those users on very outdated browsers reaches a point of diminishing returns rather quickly.

    I just checked logs on a site with decent mixed traffic (Windows and Mac) and found some interesting stats: Almost 99-percent of visitors had Flash, in one version or another, over 99.6-percent of those had Flash 8 or above.

    Java support (whatever that is… does it really mean ‘Javascript?’) was well over 96-percent. However, for site visitors using Windows and Internet Explorer, 25% were still using IE 6.x, but MSIE 5.x was well less than 1-percent. iPhone and iPod touch were about 1-percent of users.

    Assuming screen resolution stats are accurate, what will happen to the 960 grid design in the near future? It took only a few years for sites to move from 760 pixel widths to 960. Only 11-percent of site visitors had screen resolution set to 1024x768 or smaller. Over 80-percent of screens were 1280x800 or larger, which might indicate that the 960 pixel width may be going away.

    Some sites want as many visitors as possible to have a decent experience and they’re willing to pay the extra money to extend a site to cover nearly all browsers and all scenarios (Javascript, MSIE 5.x, 6.x, Flash, etc). I am finding more clients who prefer standards compliant design to browser compatibility. I prefer the former, of course, but the billable hours for the latter can be nice.

    Any thoughts?

  • #6 / Dec 02, 2008 10:33pm

    e-man

    1816 posts

    I am finding more clients who prefer standards compliant design to browser compatibility.

    Why should these 2 be mutually exclusive? The whole goal of standards-based web design is to be as compatible with as many devices as possible, it just means you won’t have the exact same experience in every browser/user agent.

    Also, this is something to strive for, not some kind of absolute 😊

  • #7 / Dec 02, 2008 10:35pm

    Stephen Slater

    366 posts

    Why should these 2 be mutually exclusive?

    Uh… that bastard known as IE 6, that’s why 😉

  • #8 / Dec 02, 2008 10:39pm

    e-man

    1816 posts

    Why should these 2 be mutually exclusive?

    Uh… that bastard known as IE 6, that’s why 😉

    Hehe… I’m feeling ya Stephen :coolsmile:

  • #9 / Dec 02, 2008 10:54pm

    grrramps

    2219 posts

    Why should these 2 be mutually exclusive? The whole goal of standards-based web design is to be as compatible with as many devices as possible, it just means you won’t have the exact same experience in every browser/user agent.

    Standards based web design has one big flaw. It doesn’t work with a device that doesn’t adhere to standards.

    MSIE, for starters.

    In other words, you can’t create a standards compliant—XHTML, CSS, Javascript—site AND have it work on all devices (browsers, and their respective devices; notebooks, desktops, phones, etc.), because those devices do not interpret standards the same way, so the experience varies dramatically at times, which requires additional effort beyond standards, and leaving heavily toward ever diminishing returns.

    Also, this is something to strive for, not some kind of absolute.

    Agreed, so, back to that most basic issue—how far does one strive to adhere to standards at the expense of users who stick to devices that do not adhere to standards?

    Most of us would agree that we no longer both with MSIE 5.x or old Netscape, but MSIE 6.x is still around, taunting designers from an open grave that cannot be filled in (as much as we try, wish, hope).

    I’m close to the point where I’m ready to flush MSIE 6 and non-Javascript compliant browsers completely. Well, except for those wonderful billable hours…

  • #10 / Dec 02, 2008 11:01pm

    Stephen Slater

    366 posts

    I’m close to the point where I’m ready to flush MSIE 6 and non-Javascript compliant browsers completely. Well, except for those wonderful billable hours…

    Idunno Ronnie, I’m to the point where I’m paying my clients to accept however-it-turns-out-in-IE6.  In the end, I save on money and hair!

  • #11 / Dec 02, 2008 11:08pm

    grrramps

    2219 posts

    I dunno Ronnie, I’m to the point where I’m paying my clients to accept however-it-turns-out-in-IE6.  In the end, I save on money and hair!

    I don’t like paying my clients. My hair is gone anyway, probably a hastened demise due to MSIE Traumatic Stress Disorder™.

    I like the “however it turns out” approach to IE6, though.

  • #12 / Dec 02, 2008 11:35pm

    JT Thompson

    745 posts

    ...always make sure that your site still works with JS turned off i.e. without the bells and whistles.

    Does anyone have any stats on what percentage of users (varies according to type of site, naturally) run their browsers with Javascript turned off?

    I wonder if it’s worth worrying about. Some jQuery plugins will degrade nicely, others just don’t (can’t?). Is it worth the effort? A similar issue exists when creating a site that runs valid XHTML and CSS. MSIE 5 and Netscape butcher standards-compliant sites, and often, the effort to create a site to fit those users on very outdated browsers reaches a point of diminishing returns rather quickly.

    I just checked logs on a site with decent mixed traffic (Windows and Mac) and found some interesting stats: Almost 99-percent of visitors had Flash, in one version or another, over 99.6-percent of those had Flash 8 or above.

    Java support (whatever that is… does it really mean ‘Javascript?’) was well over 96-percent. However, for site visitors using Windows and Internet Explorer, 25% were still using IE 6.x, but MSIE 5.x was well less than 1-percent. iPhone and iPod touch were about 1-percent of users.

    Assuming screen resolution stats are accurate, what will happen to the 960 grid design in the near future? It took only a few years for sites to move from 760 pixel widths to 960. Only 11-percent of site visitors had screen resolution set to 1024x768 or smaller. Over 80-percent of screens were 1280x800 or larger, which might indicate that the 960 pixel width may be going away.

    Some sites want as many visitors as possible to have a decent experience and they’re willing to pay the extra money to extend a site to cover nearly all browsers and all scenarios (Javascript, MSIE 5.x, 6.x, Flash, etc). I am finding more clients who prefer standards compliant design to browser compatibility. I prefer the former, of course, but the billable hours for the latter can be nice.

    Any thoughts?

    I use to track this with AWStats and found that less than 3% of my users had it turned off. It’s just not that common. How many sites rely on javascript now days?

  • #13 / Dec 02, 2008 11:39pm

    4flix

    88 posts

    This is my take on the Javascript on/off issue:  If a user is knowledgeable enough to turn off javascript then they should know that some pages will not appear/act as they should.  The only times I have seen javascript turned off is when one designer is judging another designers work (which is stupid, IMO).  Plus, if one has javascript turned off chances are your site isn’t the only site they’ve been too that needs javascript to run.  Heck, even the national news sites depend on javascript, Flash, and other technologies.

    Standards compliance is nice and good and should be followed, but unfortunately some browsers don’t have enough respect for the web to follow these standards.  If MS really wanted to, they could have patched IE6 years ago to play nice with standards. Right now I see them (IE6, Microsoft) as the jerk in the back of the classroom who does things just for attention. 

    With IE6 I am taking the approach of testing to make sure the presentation of content is desirable and the site is browsable(?).  Other than that I have a message that shows on top of sites informing the user that they have an outdated browser, the site might not act as expected (all features might not be available) and that they should upgrade (with links to IE7, Firefox, and Opera). 

    It’s funny, as I went through today designing this site, I had plans to use all these JQuery calls and plugins.  Now that I’ve gotten half way through, I’m only using JQuery plugin. 😊

    Thanks for all the help.
    Kevin

  • #14 / Dec 03, 2008 12:49am

    grrramps

    2219 posts

    This is my take on the Javascript on/off issue:  If a user is knowledgeable enough to turn off javascript then they should know that some pages will not appear/act as they should.

    I’m of the opinion that Javascript is as ubiquitous as Flash. True, there are plenty of pundits who decry Flash for all the right sins, but it’s there, it’s everywhere, and, for the most part, it works. It plays stuff.

    I think Javascript is equally embedded, too, and though it may carry a few sins, it’s there, it’s everywhere, and, usually, it works.

    That’s more than can be said about MSIE 6.x standards rendering ability.

    I’ve been digging into jQuery for less than two weeks and find the concept appealing—a single library with lots of functionality, plenty of easily embedded plugins for all sorts of nifty neato effects.

    But those plugins add up quickly to the point where Javascripts alone outweigh the size of the page (initially). Then there’s the issue with plugin conflicts, and embedding plugins that are no longer under any kind of development or support, and then just the general complexity of it all—XHTML, CSS, Javascript, EE, and so on.

  • #15 / Dec 03, 2008 1:45am

    JT Thompson

    745 posts

    I haven’t run into plugin conflicts, though I know they exist. But my thoughts are, you’re loading the core libraries anyway, instead of reinventing the wheel for 10 different functions on a site, using jQuery allows it all in a much smaller package.

    What I do is load jquery in the header, and the plugins in the body of any page that needs it. So i’m not loading 15 plugins on every page. I break my pages into templates then call them on a page. doing it this way is much cleaner for me. Pages like statistics and graphs will call all the plotting plugin stuff, while image rotations, and other ‘toys’ are loaded on pages that need them.

    Some things, like jquery popups I DO load in the header, because they can used everywhere and the script is light if you use the *min* version

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases