Progam control is at the server and I need to do a relaod. I can use a php command:
echo '<meta http-equiv="refresh" content="0">'
or I can pass control back to the client with a reload flag set and use a javascript command
window.location.reload();
Which is best practice or better to use, in terms of speed?
My guess it that the PHP version would be a bit faster because there is no logic on the client side, the browser receives the header and reloads.
I’m not concerned with disabled javascript.
Umm both examples here are CLIENT SIDE.
In example
<META>effectively the browser is aware of the refresh, PHP is just responsible for including the<META>for the document header. Cleaner way is to actually doheader( "refresh:0;url=wherever.php" );JAVASCRIPT.They both do the job. Speed doesn’t matter as the refresh is based on your parameter (when to reload/refresh)