diff --git a/config/bootstrap/dispatcher.php b/config/bootstrap/dispatcher.php index e5d5dd2..c01f919 100644 --- a/config/bootstrap/dispatcher.php +++ b/config/bootstrap/dispatcher.php @@ -50,7 +50,11 @@ // Render the toolbar (unless it's an asset from the li3_perf library) // Why? See li3_perf\extensions\util\Asset - if(!isset($params['request']->params['asset_type'])) { + $content_type = isset($result->headers['Content-Type']) ? join('', explode(';', $result->headers['Content-Type'], 1)) : ''; + if( + !isset($params['request']->params['asset_type']) && + (!$content_type || $content_type == 'text/html') + ) $skip = false; $li3_perf = Libraries::get('li3_perf'); if(isset($li3_perf['skip'])) {