简体   繁体   English

使用Java脚本进行网页重定向

[英]Web Page Redirection Using Java Script

Background 背景

I am doing Digital Signage using a raspberry Pi and most solutions allow you to only map 1 URL to the signage, but what i wanted to do is have it cycle through multiple pages on my local webserver. 我正在使用覆盆子Pi进行数字标牌,大多数解决方案允许您只将1个URL映射到标牌,但我想要做的是让它在我的本地网络服务器上循环多个页面。 The difficulty here is that we still need these pages to be intractable by normal users, as these will be for digital signage and for anyone on our local network to use. 这里的困难在于我们仍然需要普通用户难以理解这些页面,因为这些页面将用于数字标牌以及我们本地网络上的任何人使用。 I was originally thinking of just doing a meta refresh type redirection and cycle through the pages that way, but my last point makes that impractical for the normal user. 我原本以为只是进行元刷新类型重定向并以这种方式遍历页面,但我的最后一点使得普通用户不切实际。

Question

Is there a way for me to map the Pi to a digital signage only page that could pop up full windowed pages for a set amount of time? 有没有办法让我将Pi映射到一个只能在一段时间内弹出完整窗口页面的数字标牌页面? For example purposes there are 3 or more pages that i wanted to go through each for 30 seconds. 例如,有3个或更多页面我想要经历30秒。 Without editing code on those webpages at all. 没有在这些网页上编辑代码。

Any feedback would be greatly appreciated. 任何反馈将不胜感激。

my suggestion is create a mini single page app, where you will have a single URL and instead of changing the page, you change the view inside, that way all you need to do is render the new content inside the page instead of redirecting. 我的建议是创建一个迷你单页应用程序,您将拥有一个URL,而不是更改页面,您可以更改内部视图,这样您只需要在页面内呈现新内容而不是重定向。 you can use anything from backbonejs to angularjs to reactjs and many more to achieve this. 你可以使用从backbonejs到angularjs到reactjs的任何东西以及更多来实现这一点。 it might be a little complicated for you and it might not based on the actual project you are trying to do. 它对你来说可能有点复杂,它可能不是基于你想要做的实际项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM