让 nginx 在返回页面之前等待 x 秒
Make nginx wait x seconds before returning the page
我希望给定页面在 x 秒后加载,例如当有人访问 URL“https://example.com/examplelocation”时,浏览器将尝试在 nginx 之前加载页面几秒钟return 它的 HTTP 页面主体是否正常,这可能吗?
伪代码:
location ~ ^/examplelocation/ {
# wait some time and then send the response
}
我知道 echo module,它可以通过使用 echo_sleep.
延迟指定秒数的响应
location / {
echo_sleep 1;
echo_exec @test;
}
location @test {
echo $echo_request_uri;
}
如有任何疑问,请告诉我。
我希望给定页面在 x 秒后加载,例如当有人访问 URL“https://example.com/examplelocation”时,浏览器将尝试在 nginx 之前加载页面几秒钟return 它的 HTTP 页面主体是否正常,这可能吗? 伪代码:
location ~ ^/examplelocation/ {
# wait some time and then send the response
}
我知道 echo module,它可以通过使用 echo_sleep.
延迟指定秒数的响应location / {
echo_sleep 1;
echo_exec @test;
}
location @test {
echo $echo_request_uri;
}
如有任何疑问,请告诉我。