Software, your way.
burger menu icon
WillMaster

WillMaster > LibraryMiscellaneous

FREE! Coding tips, tricks, and treasures.

Possibilities weekly ezine

Get the weekly email website developers read:

 

Your email address

name@example.com
YES! Send Possibilities every week!

A Story about How Ajax Works

If you've read about how Ajax works and it's still confusing, or you still have frustrating blank spots, help is here.

To illustrate how Ajax works, I'm going to tell a story.

It's about two files on the same computer, a web page file and a software file. The software file is an internet server.

Although they're on the same computer, the only way they can talk to each other is for one of them to be somewhere else. Which makes them sad. But that's the way their world is.

They have private names for themselves. Secret names. The web page's name is, Pat W. Ebpage. And the server software's name is R. Emote Server.

It's Pat who has to go somewhere else from time to time, every time a browser asks for the web page. And it's Emote who has to send him away.

But that's all good. When Pat is loaded in a browser, Pat can talk to Emote.

In fact, Pat can be loaded into many browsers at the same time — browsers running on desktop computers and on devices and even browsing robots. The browser might be in a breakfast nook, in a dorm, or in an office. The browser's geographical location might be somewhere in Italy or Australia or Greenland. It might even be on a space station.

Whether or not Pat is somewhere else, Emote is stuck in the computer she's on and is forever accepting messages and responding to them.

The messages generally are requests for data, but sometimes they deliver data. In any case, Emote always responds with data.

So, how does Pat talk to Emote?

Well, you see, Pat has this message app named Ajax.

With Ajax, Pat sends a message to Emote. And Emote responds. Pat does things with the data received from Emote, perhaps changing a part of himself, he being the web page.

In the meantime, Emote is, of course, responding to lots and lots of messages — from many different browsers and spiders and apps. With each, Emote provides full attention — complete, 100%, mindful attention. When exchanging a message, that's the only messenger there is in Emote's world.

Every once in a while, sometimes oftener, Emote gets a message from Pat via the Ajax app.

Emote can't slow down. She has to respond to his message like all the others are responded to. But it's Pat, and she savors the exchange.

Then he's gone. Just like every messenger, when a message is responded to, the app disappears.

Poof.

Pat comes back again and again with a message from whatever browsers he might be loaded into. And Emote responds every time, quickly. They have a connection between each other. It's the only time they can talk.

Emote talks to all messengers. But Pat's Ajax app can only talk to Emote. It's a built-in security feature.

That's how they live. They exist together on the same server. They can't talk to each other unless one is off somewhere else. When they do talk, they have a strong connection with each other. The Ajax app is certain about who it's messaging because of the built-in security feature.

Ajax is an app that runs within a web page. It sends requests to the server the web page was loaded from. The server's response is used to update the web page and/or for other purposes.

Will Bontrager

Was this article helpful to you?
(anonymous form)

Support This Website

Some of our support is from people like you who see the value of all that's offered for FREE at this website.

"Yes, let me contribute."

Amount (USD):

Tap to Choose
Contribution
Method

All information in WillMaster Library articles is presented AS-IS.

We only suggest and recommend what we believe is of value. As remuneration for the time and research involved to provide quality links, we generally use affiliate links when we can. Whenever we link to something not our own, you should assume they are affiliate links or that we benefit in some way.

How Can We Help You? balloons
How Can We Help You?
bullet Custom Programming
bullet Ready-Made Software
bullet Technical Support
bullet Possibilities Newsletter
bullet Website "How-To" Info
bullet Useful Information List

© 1998-2001 William and Mari Bontrager
© 2001-2011 Bontrager Connection, LLC
© 2011-2024 Will Bontrager Software LLC