zoukankan      html  css  js  c++  java
  • Drupal启动阶段之六:页面头信息

    Drupal在本阶段为用户设置缓存头信息。Drupal不为验证用户缓存页面,每次请求时都是从新读取的。

    function _drupal_bootstrap_page_header() {
      bootstrap_invoke_all('boot'); // 调用boot钩子, 只是启动模块
    
      if (!drupal_is_cli()) {
        ob_start();
        drupal_page_header();
      }
    }
    
    function drupal_page_header() {
      $headers_sent = &drupal_static(__FUNCTION__, FALSE);
      if ($headers_sent) {
        return TRUE;
      }
      $headers_sent = TRUE;
    
      $default_headers = array(
        'Expires' => 'Sun, 19 Nov 1978 05:00:00 GMT',
        'Last-Modified' => gmdate(DATE_RFC1123, REQUEST_TIME),
        'Cache-Control' => 'no-cache, must-revalidate, post-check=0, pre-check=0',
        'ETag' => '"' . REQUEST_TIME . '"',
      );
      drupal_send_headers($default_headers);
    }
  • 相关阅读:
    oracle 主键自动地址实现
    解构赋值
    那些朋友那些话系列
    那些朋友那些话
    白鹭记事
    该如何存在
    上海秋季HCC小记
    For the person you never see again
    寻城记
    2013年的国庆
  • 原文地址:https://www.cnblogs.com/eastson/p/3380321.html
Copyright © 2011-2022 走看看