944,120 Members | Top Members by Rank

Ad:
Oct 26th, 2009
0

Make AJAX degradable

Expand Post »
I have already implemented AJAX (DWR) in a web application.My concern is that I don't want the users to lose the efficiency of AJAX simply because browser settings have disabled javascript.Already I have seen someone who has hinted on using degradable AJAX to implement AJAX regardless of whether javascript is enabled or not.Problem is, I didn't get enough material on this.Anyone please assist and be sure your help is much appreciated
Similar Threads
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
dangari is offline Offline
73 posts
since Aug 2009
Oct 26th, 2009
0
Re: Make AJAX degradable
You cannot use AJAX if JavaScript is disabled.

Always try to write your code for non-JavaScript clients and then add AJAX afterwords.

AJAX should be used to enhance the page, it should not be the core of it.
Reputation Points: 96
Solved Threads: 124
Master Poster
Will Gresham is offline Offline
728 posts
since May 2008
Oct 26th, 2009
0
Re: Make AJAX degradable
Click to Expand / Collapse  Quote originally posted by xan ...
You cannot use AJAX if JavaScript is disabled.

Always try to write your code for non-JavaScript clients and then add AJAX afterwords.

AJAX should be used to enhance the page, it should not be the core of it.
Thanks xan.Your point is both valid and most welcome. I just need the material on degradable AJAX for my personal web apps...please if you have any urls that could help to this end, just let me know man.Thanks!
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
dangari is offline Offline
73 posts
since Aug 2009
Oct 27th, 2009
0
Re: Make AJAX degradable
Dangari,

I've not heard the term "degradable AJAX" and can only guess at what it might mean.

As Will G says, AJAX simply won't work at all if Javascript is turned off.

However, you may choose to cater for (rare?) browsers with low capability Javascript that doesn't support the HTTPRequest object necessary for AJAX. The strategy (I've never needed to use it) would be always to try making an AJAX request then, if AJAX fails, make a regualr HTTP request (with suitable GET or POST parameters) to reload the whole page (with necessary additions/modifications). You would generally choose to do this only for essential functionality - not some "fancy-waistcoats" visual effect.

Airshow
Last edited by Airshow; Oct 27th, 2009 at 10:19 am.
Sponsor
Reputation Points: 318
Solved Threads: 358
WiFi Lounge Lizard
Airshow is offline Offline
2,527 posts
since Apr 2009
Oct 27th, 2009
0
Re: Make AJAX degradable
Click to Expand / Collapse  Quote originally posted by Airshow ...
Dangari,

I've not heard the term "degradable AJAX" and can only guess at what it might mean.

As Will G says, AJAX simply won't work at all if Javascript is turned off.

However, you may choose to cater for (rare?) browsers with low capability Javascript that doesn't support the HTTPRequest object necessary for AJAX. The strategy (I've never needed to use it) would be always to try making an AJAX request then, if AJAX fails, make a regualr HTTP request (with suitable GET or POST parameters) to reload the whole page (with necessary additions/modifications). You would generally choose to do this only for essential functionality - not some "fancy-waistcoats" visual effect.

Airshow
Thanks a lot Airshow.I have just realised that I should have clarified that I needed help with making a graceful degradation to AJAX code(in case JS isn't supported application still works albeit in a less fancy way)...In short, you hit the nail on the head with your post.If you could give me any url to this end, I would be very grateful.
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
dangari is offline Offline
73 posts
since Aug 2009
Oct 27th, 2009
0
Re: Make AJAX degradable
You might want to research "HIJAX" which is an approach (like "AJAX" neither a product nor a language).

HIJAX gets a mention (but no more than that) in one of my reference books - "Beginning Javascript with DOM Scripting and AJAX" by Christine Heilmann (Apress, 2006), ISBN 1-59059-680-3. Apparantly HIJAX was coined by a Jeremy Keith, so it may also be worth searching for publications that bear his name.

Sorry I can't be of any more help but, like many if not most AJAX programmers I suspect, I am guilty of having not handled failure cases as robustly as I could have. Your question is a prompt for me to learn more. You may look forward to answering my questions some time in the future!

Airshow
Sponsor
Reputation Points: 318
Solved Threads: 358
WiFi Lounge Lizard
Airshow is offline Offline
2,527 posts
since Apr 2009
Oct 28th, 2009
0
Re: Make AJAX degradable
Click to Expand / Collapse  Quote originally posted by Airshow ...
You might want to research "HIJAX" which is an approach (like "AJAX" neither a product nor a language).

HIJAX gets a mention (but no more than that) in one of my reference books - "Beginning Javascript with DOM Scripting and AJAX" by Christine Heilmann (Apress, 2006), ISBN 1-59059-680-3. Apparantly HIJAX was coined by a Jeremy Keith, so it may also be worth searching for publications that bear his name.

Sorry I can't be of any more help but, like many if not most AJAX programmers I suspect, I am guilty of having not handled failure cases as robustly as I could have. Your question is a prompt for me to learn more. You may look forward to answering my questions some time in the future!

Airshow
Thanks Airshow.
Actually you've helped me more than you think because I believe in being pointed in the right direction as opposed to being spoon-fed.I still consider the post as being solved by you.Just make a reply and I'll mark it as solved.Jeremy Keith's material on the web is indeed what I need.Thanks again!
Last edited by dangari; Oct 28th, 2009 at 4:38 am.
Reputation Points: 10
Solved Threads: 3
Junior Poster in Training
dangari is offline Offline
73 posts
since Aug 2009
Oct 28th, 2009
0
Re: Make AJAX degradable
Pleased to be of help Dangari. It seems that sometimes the blind can lead the blind. I will follow up "Jeremy Keith" myself.

Airshow
Sponsor
Reputation Points: 318
Solved Threads: 358
WiFi Lounge Lizard
Airshow is offline Offline
2,527 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: retrieve textbox old value
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Pre-fill automatically a form field with part of the URL





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC