Nginx HTTP/2服务器推送带有变量的样式表,并在每次更改变量时使其工作?
我是HTTP/2服务器,通过以下方式推送我的Wordpress style.css:Nginx HTTP/2服务器推送带有变量的样式表,并在每次更改变量时使其工作?,nginx,https,http-headers,http2,server-push,Nginx,Https,Http Headers,Http2,Server Push,我是HTTP/2服务器,通过以下方式推送我的Wordpress style.css: ## Server push add_header link "</wp-content/themes/template/style.css?ver=20170228a>; rel=preload; as=styles"; ##服务器推送 添加标题链接“rel=预加载;as=样式”; 它就像一个符咒,但当我更改style.css?ver=20170228a版本时,我会更新变量字符串,以便经常
## Server push
add_header link "</wp-content/themes/template/style.css?ver=20170228a>; rel=preload; as=styles";
##服务器推送
添加标题链接“rel=预加载;as=样式”;
它就像一个符咒,但当我更改style.css?ver=20170228a版本时,我会更新变量字符串,以便经常访问的用户可以更轻松地重新缓存新文件,即:style.css**?ver=20170303a**
在添加头链接规则中是否有任何方法可以实现这一点???类似(obv不起作用,但喜欢使用变量):
添加标题链接“rel=preload;as=styles”;
Hm,我用php发送。这可能是你的解决方案吗?
不知道nginx,sry。Hm,我用php发送。这可能是你的解决方案吗? 不知道nginx,sry
add_header link "</wp-content/themes/template/css/$uri?$args>; rel=preload; as=styles";