Reputation: 19799
As JavaScript can be disabled in the browser by the user, I wonder if there is any way of developing an Application which uses Ajax but it doesn't use Javascript, so even if Javascript is disabled it goes on working. Is there any limitation?
Upvotes: 15
Views: 10308
Reputation: 273796
AJAX isn't possible without Javascript, because it presupposes JS code running on the client. If JS is disabled, there's nothing that can execute in the browser and contact the server - only "dead" HTML and CSS.
Flash is an alternative, but then again it can be disabled too.
Upvotes: 23
Reputation: 29540
As others said, AJAX is JavaScript. But there are Alternatives (but each one requires plugins to be present)
But be sure, if somebody deactivated JavaScript, he has these deactivated as well. I believe most people don't deactivate JavaScript because nowadays it is very safe and performant and doesn't annoy very much in contrast to other plugins. Besides, most modern websites require JavaScript.
You can also use server sided scripting like PHP and then use HTTP-META-REFRESH to refresh your page, this can in some cases simulate cases where you would have used JavaScript otherwise.
But it greatly depends on what you are trying to do, it would be nice to hear that from you.
Upvotes: 4
Reputation: 26165
actually, not sure if this helps or not, if it's sending
data that you need through GET, you can use a simple image, like:
<img src="/myfile.php?a=log&id=myuser&page=index.php" />
I would not go calling this an AJAX application though :D
Upvotes: 1
Reputation: 3890
The Javascript bit in Asynchronous JavaScript And XML
is rather important, as it is the Javascript that manipulates the page clientside, so even if you were able to do an asynchroneus post to the server and get a result back - it wouldn't be possible for you to update the page content.
Most people have Javascript enabled these days, and I don't know of many rich sites that don't rely on Javascript in some way. So unless its a clear demand from your client or such, I would not worry about browsers that disable Javascript.
Upvotes: 1
Reputation: 1591
You should look into "graceful degradation". It won't give you the dynamic input/feedback that Ajax "gave the web", but that was how most of the web worked back in 2005 and before.
Other than that, your choices are Flash or Java but I wouldn't recommend that and I don't get the impression you were looking for such a recommendation either.
Upvotes: 7
Reputation: 2201
Ajax = Asynchronous JavaScript And XML. You can't have Ajax without JavaScript!
Upvotes: 5
Reputation: 401182
AJAX actually means Asynchronous Javascript And Xml -- note the Javascript part.
You cannot use Ajax without Javascript : HTML by itself is not dynamic : you need Javascript for that.
(Yeah "Ajax" means more than just AJAX -- but the idea is the same)
Upvotes: 6
Reputation: 27900
Well, you can't literally use Ajax without Javascript, since the "J" in Ajax is for "Javascript"
The best you can do is test for Javascript functionality and load a non-Ajax version of the page instead.
Upvotes: 5
Reputation: 70879
The limitation is the 'j' in Ajax. You need JavaScript to do Ajax - there's no way to update page content without it.
You should always try to design your Ajax applications so that links have a non-ajax fallback wherever possible. So if you have a link which updates a div with new data, when JavaScript is turned off that link will lead to a new page which has that div updated.
Upvotes: 7
Reputation: 22948
There is absolutely no way, its same like running car without engine or gas ..
Upvotes: 1