1 bootstrap.inc backdrop_set_length_headers($content_length)

Set headers for content-length and content-range.

These headers allow the browser to deliver the page to the user without waiting for PHP to finish execution.


core/includes/bootstrap.inc, line 1702
Functions that need to be loaded on every Backdrop request.


function backdrop_set_length_headers($content_length) {
  // Set the total content length.
  backdrop_add_http_header('Content-Length', $content_length);

  // If using chunked content (enabled with Apache mod_deflate), then specifying
  // the content range is required. This delivers the entire page in one chunk.
  backdrop_add_http_header('Content-Range', '0-' . ($content_length - 1) . '/' . $content_length);