• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between refreshing a page in ajax and servlet

 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends, we can refresh a page with servlet and ajax. what is the difference between this. why ajax is best
 
Srikkanth Mohanasundaram
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a choice which you need to make based on your requirement.

For instance ,say you have section in a page which needs to be updated regularly or something which the user doesn't need to proceed further, you can go for AJAX (which sends a request to the server and fetches XML or HTML fragment etc., ) . So here we avoid a page refresh scenario, and the user doesn't have to wait until the server is done.
There are a lot of tutorials available which will help you understand better.

Thanks,
Srikkanth
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65120
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't refresh a page with Ajax -- that's the whole point of Ajax.

And, one is never always "better" than the other. It depends upon the task at hand.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic