Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在 Pyramid 中获取用户的浏览器宽度和高度?我搜索了响应对象并用 Google 搜索。
如果它在 Pyramid 中不可用,我将在 javascript 中获取它
不,仅使用服务器端代码无法确定。浏览器在向服务器发出 HTTP 请求时不会共享该信息。
您必须使用 JavaScript 来执行此操作。