AJAX is the Web’s Radioman

Javascript is like the cinematic Special Forces guy who parachutes into a jungle and, on his own, kill off an mercenary army of bad-guys. But if he runs out of Cheetos, he puts in an order on his Satphone and a drone later drops him another case of Cheetos, and he is able to continue his senseless, entertaining slaughter. AJax is that Cheetos delivery service. You will find no simpler explanation. You’re welcome.

WordPress makes much use of AJAX in the back-end. Javascript lets you do things in the now, and AJAX makes things happen without you submitting a form. Since you could do hundreds of things when on an admin page, AJAX saves you from pressing “Submit” hundreds of times.

It’s a technology proposed to the Internet, the technology is called XHR. It’s a proposal that also ushered in an age of Asynchronous processes, which required a whole-new way of thinking on how to divvy up your script. Recently, the Javascript people introduced the concept of “Promise”, in which Javascript added functions, libraries and processes that make sure if your Javascript asks another server for something, it will get the result, or know something went wrong. Simple concept, a real headache to build in. BUt this is what it takes to let your script ask its host server for anything.

I do not use AJAX often. I prefer my Javascript to be independent and I do not like bugging the server. If one guy triggers an AJAX, that’s no problem. Nor 100 readers. But 10,000 at the same time keeps a server mighty busy.

One thing I am using AJAX for in the Storyteller plugin is to upload cookies to the server. I could use REST, but since I am adding an ability to upload data to a plugin on a server without a reader signing in, that’s inherently insecure. I use AJAX instead, since it is designed to work wwithin a server and has better security.


Posted

in

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Upload Files Drag and drop your files here or click the button to upload your files from your computer

multi file upload Drag and drop your files Max Upload: 20 MB
close image preview
image preview
Task already exist for this element.
Write your message in the existing thread.
Here, we opened it for you.
Pushed to Media Folder.
The file was added to the website's media folder, you can now use it from the there.
poweredby
hide sidebar icon
sidebar left
sidebar menu
sidebar menuThis Page
sidebar menuAll Pages
sidebar menuShow Complete Tasks
sidebar menuShow Internal Tasks
sidebar menuSort by Date
sidebar menuSort by Priority
sidebar menuSort by Status
Tasks
Pages
no task in sidebar
Add your comments
Click any part of the page to start collaborating
              Loading...
              link to inbox
              responsive box
              desktop iconDesktop
              tablate iconTablet
              mobile iconMobile
              Browse Comment
              ×
              ×
              Approve Page

              When the page is ready, click the green button to signal to the webmaster that <b>this page is approved.

              there was some error. Please try again.
              ×
              Page Approved
              Desktop Tablet Mobile
              Back to Standard View
              You Ran Out of Website Slots

              That's great!
              It means you're growing & onboarding more clients!<br>Don't let it stop you

              There was some error. Please try again.