Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Using CGI::Ajax for multiple form buttons/divs simultaneously

by Your Mother (Archbishop)
on Mar 19, 2018 at 13:27 UTC ( [id://1211240]=note: print w/replies, xml ) Need Help??


in reply to Using CGI::Ajax for multiple form buttons/divs simultaneously

I am not using jQuery, Catalyst…bloated nature. I require a bandwidth-efficient solution due to poor internet access…

Catalyst is only "bloated" in server-side RAM usage. Bandwidth does not come into it. jQuery is larger than several pure Ajax libs but smaller than plenty of others—minified and gzipped it's going to be a one time cost of around 30K—and if you use a version from a CDN like Google's, is guaranteed to be fast and depending on the clients, possibly already cached in the browser. Putting the most information in a single exchange, as opposed to direct triggering of snippets, is the most bandwidth friendly approach; unless you move to websockets or something similar (Corion had something related and neat here that I never followed-up to learn more about and can't quite remember. <- Update: I was remembering something that wouldn't be of help here).

Not saying your approach is inappropriate at all. Sometimes closer to the metal is necessary. Just wanted to balance the cat skinning considerations. :P

  • Comment on Re: Using CGI::Ajax for multiple form buttons/divs simultaneously

Replies are listed 'Best First'.
Re^2: Using CGI::Ajax for multiple form buttons/divs simultaneously
by Polyglot (Chaplain) on Mar 20, 2018 at 05:44 UTC

    I appreciate the contribution of your opinion. A nice website I found addressing the impact of jQuery's size was this one:

    https://modernweb.com/is-jquery-too-big-for-mobile/.

    That website backs up my assertions regarding the benefit of avoiding jQuery. I know my target audience and situation. My clients will be mostly on older Android phones in an otherwise 1 Mbps-dominated third-world country, and they will be accessing this application through a server on the other side of the world, almost maximizing the latency of the connection. Given the particular circumstances I'm dealing with, it's worth the effort for me to make AJAX work. Plus, I get to learn how to implement AJAX.

    Blessings,

    ~Polyglot~

      That website backs up my assertions

      It also says know/test your audience, and that amazon and other big money sites should be super fast

      Every other day I visit the big money sites amazon/ebay/walmart.. and they're all much much much slower than the worst case scenario presented in that website

      So avoiding jquery cause some random website argues its costing you sales based on ancient nonsense , is not a good way to back up your assertions , it simple confirmation bias

        hehe, I just finished reading the article, it makes the same point, don't consider ditching jquery until you've optimized everything else
Re^2: Using CGI::Ajax for multiple form buttons/divs simultaneously
by Polyglot (Chaplain) on Mar 20, 2018 at 15:30 UTC

    As I am now getting things nearly functional (the AJAX part is working except for the UTF8 encoding issues that still remain), I have been able to extract the JavaScript created by CGI::Ajax and save it to a separate file, then gzip it for proper size comparison. It amounts to 2.1 KB. That is at least 14 times smaller than the jQuery option you mentioned. Given the thousands of connections which this project will require, that works out to more than a negligible bandwidth savings.

    Blessings,

    ~Polyglot~

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1211240]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-19 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found