views:

150

answers:

2

I developed an application that is fully based on SJAX (synchronous jax). I am sending data thru POST-SJAX instead of form submit. My idea is not to refresh the browser.

The advantage of this method is:

  1. Number of HTTP request is reduced.
  2. Number of DB calls will be reduced.
  3. No need to repopulate data when the page refreshes.

All I want to know is this idea works effective?

A: 

Sure, especially because the content generated on the other end of the POST cant be spidered by search engines because it would have been a form anyway. Just make sure you include the right noscript tags and fallbacks in case a users browser doesn't have JavaScript enabled, or include an error message.

Sam152
+1  A: 
  1. Guess you are counting image calls, JavaScript calls, etc. With good caching this does not even matter. I have seen Ajax applications where the developer thought this and actually increase the number of HTTP requests because of bad designs.

  2. Number if DB calls depends on how you code your application in general. Good serverside caching of data can really reduce it so Ajax really does not matter here. Your DB calls will go down if you make an Ajax call and you only do one action.

epascarello