Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Should JavaScript go?

Options
  • 30-11-2015 1:24pm
    #1
    Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭


    Just looking at the length of time it took the www.boards.ie landing page to load with JS and I'm thinking, should it go in the way of flash, but maybe not for the same reasons? Could the likes of Go or Dart replace JS and a few other front end web development languages?

    Just looking for opinions.


Comments

  • Moderators, Society & Culture Moderators Posts: 17,642 Mod ✭✭✭✭Graham


    It's not necessarily javascript at issue. It's advertisers bundling reams of sh1te unnecessarily.

    I tried out Ghost earlier in the year, here's an example of what slows your page down (all on a single page):

    358589.jpg


  • Closed Accounts Posts: 1,243 ✭✭✭symbolic


    Should Javascript go... Into more layers of the development stack? Yes!


  • Registered Users Posts: 10,494 ✭✭✭✭28064212


    Go isn't a front-end language. Dart compiles to Javascript (and plans for native Chrome support were cancelled).

    Flash was slow and insecure. JS is fast and (by-and-large) secure. Poorly-written JS scripts can be slow, or pages can be slow because they're loading hundreds of scripts, but the language used is not the problem. There is zero chance of anything replacing JS in the near-to-medium future

    Boardsie Enhancement Suite - a browser extension to make using Boards on desktop a better experience (includes full-width display, keyboard shortcuts, dark mode, and more). Now available through your browser's extension store.

    Firefox: https://addons.mozilla.org/addon/boardsie-enhancement-suite/

    Chrome/Edge/Opera: https://chromewebstore.google.com/detail/boardsie-enhancement-suit/bbgnmnfagihoohjkofdnofcfmkpdmmce



  • Registered Users Posts: 11,977 ✭✭✭✭Giblet


    I'm a big believer that if you have a website that's used by mobile users, you should limit JavaScript to basic functions and forgo things like Angular and jQuery, lots of develops bunging up large scripts which crunch UI in the front end and cause horrible framerate issues and jank, It might make sense to move to Angular 2 or React and enable server rendering as long as nothing is loaded before the content appears. Ads are the biggest killers though, and it's the one thing most companies *will not remove* from their pages even though they are chewing up CPU on mobile devices. You would be surprised (or maybe not) how fast websites are without JavaScript, as long as developers have some foresight to test what happens when Javascript is disabled or fails. (I've seen a few Angular sites have the CDN fail for angular, and nothing appears even though kilobytes of raw templates are sitting there doing nothing.)


  • Registered Users Posts: 6,039 ✭✭✭Talisman


    Itzy wrote: »
    Just looking at the length of time it took the www.boards.ie landing page to load with JS and I'm thinking, should it go in the way of flash, but maybe not for the same reasons? Could the likes of Go or Dart replace JS and a few other front end web development languages?

    Just looking for opinions.
    JavaScript isn't the issue - poor practices are. JavaScript is here for the foreseeable future, it won't be replaced on the client side anytime soon.

    Go isn't a client side solution, it's like a refined version of C with a focus on concurrency which is great for the server side but offers little benefit to the client.

    Dart also isn't a replacement for JavaScript, it has to be compiled to JavaScript in order to run in the browser. Dart's future also lies on the server side.


  • Advertisement
  • Registered Users Posts: 36,166 ✭✭✭✭ED E


    As above, its really ****ty ad providers. It was mentioned on a podcast recently where one of the big tech news sites had a JS ad/tracker that called another piece of js which called another on and on 17x (from memory)! Its this kinda of messing that makes a mess of things.

    I understand ad blocking isnt sustainable for the current business model of most sites but I find the web unusable without it.


  • Registered Users Posts: 403 ✭✭counterpointaud


    In my current project I am dealing with ~10 ad agencies, and their absolute disregard for users has been astonishing to behold. During testing, each agency would make 1 -3 requests, after deployment I discovered that some were triggering 10 - 15 requests. Really badly written scripts in some cases too. This stuff has to go, or at least be reined in to some sane levels. I would love to see some stats on the battery usage consumed on mobile devices by ad agencies.


  • Registered Users Posts: 6,250 ✭✭✭Buford T Justice


    In my current project I am dealing with ~10 ad agencies, and their absolute disregard for users has been astonishing to behold. During testing, each agency would make 1 -3 requests, after deployment I discovered that some were triggering 10 - 15 requests. Really badly written scripts in some cases too. This stuff has to go, or at least be reined in to some sane levels. I would love to see some stats on the battery usage consumed on mobile devices by ad agencies.

    Vicious circle really. Sites allow the scripts because the're revenue generating and ad companies couldn't give a toss cos they're getting revenue from clickthrus & redirects and all of that. It'll evolve soon enough though.


  • Registered Users Posts: 6,039 ✭✭✭Talisman


    In my current project I am dealing with ~10 ad agencies, and their absolute disregard for users has been astonishing to behold. During testing, each agency would make 1 -3 requests, after deployment I discovered that some were triggering 10 - 15 requests. Really badly written scripts in some cases too. This stuff has to go, or at least be reined in to some sane levels. I would love to see some stats on the battery usage consumed on mobile devices by ad agencies.
    I had some experience with this on a project in the last year. The link tracking solution provided for the client by a third party was taking 1-2s to perform a redirect because of the way analytics were implemented. I joked to the client that they should consider placing advertising on the redirect page because it was taking so long that they were losing traffic and may as well try to make some money out of it.

    The client asked if there was much work involved in doing so because it had previously been suggested by the third party. It was a crazy/stupid joke but they would have went for it. I had to explain that it was a really bad idea and that the slow redirect solution was costing them conversions and robbing users of their time.

    As a proof of concept I hacked together a solution in Node.js that did the redirects in 20-30ms and still performed the analytics. The third party insisted that it wasn't working but a combination of logging all requests to a database and also to GA proved otherwise. The volume of conversions using the server side solution is thousands of percentage points higher than the previous solution.

    Everybody is happy apart from the original third party provider.


  • Registered Users Posts: 6,039 ✭✭✭Talisman


    Vicious circle really. Sites allow the scripts because the're revenue generating and ad companies couldn't give a toss cos they're getting revenue from clickthrus & redirects and all of that. It'll evolve soon enough though.
    A lot of issues with ads is that they now use real time bidding. Depending on the location of the service, the request could be sent to a server on the other side of the planet meaning there'll be a massive network delay (500ms+) on receiving the response.


  • Advertisement
  • Moderators, Science, Health & Environment Moderators Posts: 8,865 Mod ✭✭✭✭mewso


    It's funny when I think back to over 10 years ago when JavaScript went seriously out of favour. Most guides/blogs recommended not using it. It was used for pointless image hovers, tacky animations and seriously bloated/broke web pages.

    Then about 10 years ago the mood changed. First saw discussion of unobtrusive javascript and the concept of web pages that worked without script but could be then enhanced with it. Don't ignore javascript simply use it in a better way. To this day I still code my javascript that way because I find it the most elegant way to do it. Then ajax became a thing followed closely by wrappers (jquery and so on) and gradually we have come full circle and now our web pages are bloated yet again. We'll never learn.


Advertisement