Does the Meta Refresh tag (with a delay of 0) wait for all components of page to load \ all scripts to finish executing before performing redirect?
I have the following page tag in the HTML document's head:
<meta http-equiv="refresh" content="0;url=http://example.com/">
Can I count on everything to get run? Or may the browser cancel downloading scripts \ performing AJAX \ running scripts mid-way due to a redirect?
preguntado el 01 de febrero de 12 a las 14:02
"Can I count on everything to get run?" - No
It is context dependent, i.e how the page is composed and which user agent you are talking about. It's not fool proof.
Why not do the redirect server-side using Response.Redirect (.NET) or header("Location:"); (PHP)?