gpt4 book ai didi

javascript - 在 Nginx 或 Django 中安装 Prerender?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:31:27 27 4
gpt4 key购买 nike

Prerender.io允许您 install通过编辑 Nginx config或添加 Django middleware .

性能差异是什么(如果有),哪种设置更好?

prerender getting started

最佳答案

通过电子邮件向 Prerender 发送相同的问题和来自 Todd 的答案在 Prerender 上,

You should set up the token wherever you set up your middleware. As far as which middleware to use, the nginx middleware lets nginx handle the proxy in an asynchronous manner so that requests from crawlers are never even sent to your Django server. Using the Django middleware, the requests will hit you Django server and then be proxied. Make sure that Django middleware uses non-blocking I/O so that requests to Prerender don't pause the thread.

In either case, if Prerender.io doesn't have the page cached, Prerender will make another request to your server for that page to cache it on the fly.

关于javascript - 在 Nginx 或 Django 中安装 Prerender?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26854617/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com