Jump to content

When And How Much Should I Use Javascript?


migroo

Recommended Posts

The title pretty much says it all. If I use AJAX and JS to make a webpage more user friendly and interactive should I worry about over using JavaScript?

Link to comment
Share on other sites

Really it depends on your goal for the website and your target audience. If you want maximum compatibility and useability you should probably keep an eye on your JS usage. I don't think you can really "over-use" it, but remember to have fall-backs in place for those users who have it disabled.

Link to comment
Share on other sites

Either that, or commit to it fully. Many of my projects now require Javascript to function at all. The largest project I'm working on has only a few KB of HTML code with over 2MB of Javascript, for example. Especially now with mobile devices and touch interfaces, if you want to avoid page reloads to make the thing work more like an app than a web page, you need to use Javascript.

Link to comment
Share on other sites

Either that, or commit to it fully. Many of my projects now require Javascript to function at all.
That's the route I usually take, too.
The largest project I'm working on has only a few KB of HTML code with over 2MB of Javascript, for example.
:blink: My entire project (including HTML, CSS, JavaScript, PHP, and even images) is just a little over 1 MB and that sucker is nearing 15k lines of code. I can't imagine what 2 MB looks like!
Link to comment
Share on other sites

2MB of JavaScript. :Shock: Wow!I guess I'm fine then.So as long as I'm not confusing the user by switching styles on them the file size on my JavaScript shouldn't be a problem.

Link to comment
Share on other sites

And as long as the JS is compatible with my target audience...

Link to comment
Share on other sites

My entire project (including HTML, CSS, JavaScript, PHP, and even images) is just a little over 1 MB and that sucker is nearing 15k lines of code. I can't imagine what 2 MB looks like!
It gets a little ridiculous. The largest Javascript file in the project, uncompressed, is just under 40k lines and 1.5MB. When it gets delivered to the client though, because of minifying the code and server compression, it only uses about 140KB of bandwidth.
Link to comment
Share on other sites

This forum (and anyone who uses IPB, obviously) has.I rarely browse with JS disabled, so I'm not sure... but the number of such site has grown, that's for sure.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...