diff --git a/view/Requirements.php b/view/Requirements.php index af9db8aa2..745bbbc0c 100644 --- a/view/Requirements.php +++ b/view/Requirements.php @@ -1148,8 +1148,10 @@ class Requirements_Backend $jsRequirements[] = str_replace(',', '%2C', $path); } } - - $response->addHeader('X-Include-JS', implode(',', $jsRequirements)); + + if(count($jsRequirements)) { + $response->addHeader('X-Include-JS', implode(',', $jsRequirements)); + } foreach($this->getCSS() as $file => $params) { $path = $this->pathForFile($file); @@ -1159,7 +1161,9 @@ class Requirements_Backend } } - $response->addHeader('X-Include-CSS', implode(',', $cssRequirements)); + if(count($cssRequirements)) { + $response->addHeader('X-Include-CSS', implode(',', $cssRequirements)); + } } /** @@ -1655,4 +1659,4 @@ interface Requirements_Minifier { * @return string minified content */ public function minify($content, $type, $filename); -} \ No newline at end of file +}