After an Ajax call I reload a web page. I have two options..
I can send the page as responseText and have it write to the screen using document.write().
I can send a control to Javascript telling it to reload the web page using window.location.href.
Option 1 is good because it takes only one round trip instead of two. However the onload Event was not triggered as it would with a normal reload.
Option 2 is good because it triggers the onload Event.
Is there any way to to get the best of both worlds...i.e. I would like to send the page using responseText but also have it loaded like a new page, once it is recevied.
I simply does not make sense to make 1.5 trips instead of .5 trips when you are on the server (control is on the server) and need to reload the page. Is this a weakness of Ajax or do I just not know hot to do it?
Related:
*