Hi,
I still am confused regarding Ajax technology. And I still cannot answer this question of mine as I am still trying to grasp the technology.
Its regarding posting data with the server. In normal non-ajax web app, I usually do PRG (Post-Redirect-Get) pattern when I am doing a POST command. I have learned that this will prevent double submit problem or when the user tries to refresh the page or perform some Back-Forward transaction at the browser.
In Ajax, you do not perform a redirect because this will defeat the purpose of ajax as this is what the tutorials and books that I am folowing is saying
In Jquery, when I perform
$(document).ready(function(){
$("#myForm").submit(function(){
$.post("test.htm", function(data){
alert("Successfully save data");
}, "json");
//prevent page refresh
return false;
});
});
and the user performs, refresh(F5) or user performs a Back and Forward browser transaction. Am I not risk of having double submit problem? Will the browser reload my click event again.
Sorry if this might sound too dumb to others but I just want to clarify my thoughts for a newbie like me.