As have been discussed in one of the posts here; there was someone who dynamically attached javacript code above the doctype declaration and it then made his browser to go into quirks mode..I am currently in the same condition, only in my case I am dealing with PHP code snippet below that has to be inserted above the doctype otherwise I would get PHP "whitespace" error.
<?php session_start();
if(!session_is_registered("reg")){
header("location:page1.php");
}?>
<!DOCTYPE html>
So would that bring my browser into quirks mode? If it would, is there any workaround? appreciate any help/suggestion. thanks.
No. PHP code is processed before the browser consumes it. Just make sure you don't send any trailing characters after your PHP or echo anything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With