Add option to control HTTP/2 server push

This commit is contained in:
Kijin Sung 2016-05-06 22:07:02 +09:00
parent 942235b6bc
commit 06c6455488
6 changed files with 12 additions and 0 deletions

View file

@ -700,6 +700,7 @@ class adminAdminController extends admin
Rhymix\Framework\Config::set('session.use_db', $vars->use_db_session === 'Y');
Rhymix\Framework\Config::set('view.minify_scripts', $vars->minify_scripts ?: 'common');
Rhymix\Framework\Config::set('view.concat_scripts', $vars->concat_scripts ?: 'none');
Rhymix\Framework\Config::set('view.server_push', $vars->use_server_push === 'Y');
Rhymix\Framework\Config::set('view.gzip', $vars->use_gzip === 'Y');
// Save

View file

@ -531,6 +531,7 @@ class adminAdminView extends admin
Context::set('use_db_session', Rhymix\Framework\Config::get('session.use_db'));
Context::set('minify_scripts', Rhymix\Framework\Config::get('view.minify_scripts'));
Context::set('concat_scripts', Rhymix\Framework\Config::get('view.concat_scripts'));
Context::set('use_server_push', Rhymix\Framework\Config::get('view.server_push'));
Context::set('use_gzip', Rhymix\Framework\Config::get('view.gzip'));
$this->setTemplateFile('config_advanced');

View file

@ -92,6 +92,7 @@ $lang->cmd_concat_css_only = 'Combine all CSS';
$lang->cmd_concat_js_only = 'Combine all JS';
$lang->cmd_concat_css_js = 'Combine both CSS and JS';
$lang->about_concat_scripts = 'Automatically combine CSS and JS scripts into as few files as possible. External scripts are not combined.';
$lang->use_server_push = 'Use HTTP/2 Server Push';
$lang->use_gzip = 'gzip Compression';
$lang->delay_session = 'Delay session start';
$lang->about_delay_session = 'To improve performance when using a caching proxy server such as Varnish, do not issue sessions to visitors until they log in.<br>Selecting this option may cause view counts and visitor counts to become inaccurate.';

View file

@ -89,6 +89,7 @@ $lang->cmd_concat_css_only = 'CSSのみ結合';
$lang->cmd_concat_js_only = 'JSのみ結合';
$lang->cmd_concat_css_js = 'CSSやJSの両方を結合';
$lang->about_concat_scripts = 'CSS、JSファイルを一つにまとめて送信されます。外部からロードするスクリプトは、合わせてされません.';
$lang->use_server_push = 'HTTP/2 Server Push使用';
$lang->use_gzip = 'gzip 圧縮';
$lang->delay_session = 'セッションの開始を遅延';
$lang->about_delay_session = 'Varnishなどのプロキシキャッシュサーバ使用時のパフォーマンスを向上させるために、ログインしていないユーザーには、認証セッションを付与しません。<br>このオプションを選択した場合、訪問者数とヒット集計が正確でない場合があります。';

View file

@ -92,6 +92,7 @@ $lang->cmd_concat_css_only = 'CSS만 합침';
$lang->cmd_concat_js_only = 'JS만 합침';
$lang->cmd_concat_css_js = 'CSS와 JS를 모두 합침';
$lang->about_concat_scripts = 'CSS, JS 파일들을 하나로 합쳐서 전송합니다. 외부에서 로딩하는 스크립트는 합쳐지지 않습니다.';
$lang->use_server_push = 'Server Push 사용';
$lang->use_gzip = 'gzip 압축';
$lang->delay_session = '세션 시작 지연';
$lang->about_delay_session = 'Varnish 등의 프록시 캐싱 서버 사용시 성능 개선을 위해, 로그인하지 않은 사용자에게는 인증 세션을 부여하지 않습니다.<br>이 옵션을 선택할 경우 방문자 수 및 조회수 집계가 정확하게 이루어지지 않을 수 있습니다.';

View file

@ -97,6 +97,13 @@
<p class="x_help-block">{$lang->about_concat_scripts}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->use_server_push}</label>
<div class="x_controls">
<label for="use_server_push_y" class="x_inline"><input type="radio" name="use_server_push" id="use_server_push_y" value="Y" checked="checked"|cond="$use_server_push" /> {$lang->cmd_yes}</label>
<label for="use_server_push_n" class="x_inline"><input type="radio" name="use_server_push" id="use_server_push_n" value="N" checked="checked"|cond="!$use_server_push" /> {$lang->cmd_no}</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->use_gzip}</label>
<div class="x_controls">