diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index b99f603fe0bc99f9ebf74151ac671d217f747edd..7895e624507bef72e65adae07875a3dccd2bab62 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -30,7 +30,6 @@
 			?>
 		<?php endforeach; ?>
 	</head>
-	<?php flush(); ?>
 	<body id="body-public">
 		<?php print_unescaped($_['content']); ?>
 	</body>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index c4b69a950a0e983839a0412db417803b490f9b43..a2d386e86d4a66e27844abc1740f357e7e276dbd 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -32,7 +32,6 @@
 			?>
 		<?php endforeach; ?>
 	</head>
-	<?php flush(); ?>
 	<body id="body-login">
 		<div class="wrapper"><!-- for sticky footer -->
 			<div class="v-align"><!-- vertically centred box -->
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 989ffd528f4b901bf9fc7e2d5ff7172ae204ac97..ce1522b717c549eef5a3af96df05fe45a1882d6c 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -39,7 +39,6 @@
 			?>
 		<?php endforeach; ?>
 	</head>
-	<?php flush(); ?>
 	<body id="<?php p($_['bodyid']);?>">
 	<noscript><div id="nojavascript"><div><?php print_unescaped($l->t('This application requires JavaScript to be enabled for correct operation.  Please <a href="http://enable-javascript.com/" target="_blank">enable JavaScript</a> and re-load this interface.')); ?></div></div></noscript>
 	<div id="notification-container">