views:

198

answers:

11

Hello,

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?

Thanks.

+10  A: 

AJAX isn't possible without Javascript, because it presupposes JS code in the running in 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.

Eli Bendersky
A: 

There is absolutely no way, its same like running car without engine or gas ..

c0mrade
You can still get out and push it :)
codymanix
@codymanix then its not a car, you can also send request to the server without javascript/ajax .. it also "works" but that is not asynchronous then.
c0mrade
+3  A: 

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.

Skilldrick
+3  A: 

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.

David Gelhar
+3  A: 

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)

Pascal MARTIN
+2  A: 

Ajax = *A*synchronous *J*avaScript *A*nd *X*ML. You can't have Ajax without JavaScript!

Molex
+5  A: 

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.

RobbieGee
+1 for *graceful degradation*. Belonging to this: **unobtrusive JavaScript** http://en.wikipedia.org/wiki/Unobtrusive_JavaScript
Felix Kling
+1  A: 

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.

Luhmann
A: 

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

Dimitar Christoff
You can use HTTP-META-REFRESH to refresh image for a slide-show
codymanix
A: 

As others said, AJAX is JavaScript. But there are Alternatives (but each one requires plugins to be present)

  • Silverlight (works as Moonlight on Linux too!)
  • Flash
  • Java

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.

codymanix
A: 

Dude ! AJAX is Javascript.

RAHUL PRASAD