简体   繁体   English

将页面重定向到其他Web浏览器

[英]Redirect a page to a different web browser

I have a ASP.Net page for our company and we are running a parallel testing to the new web site. 我的公司有一个ASP.Net页面,我们正在对新网站进行并行测试。 Now, the I attached a clickable image on the old website which redirects to the new web site. 现在,我在旧网站上附加了一个可点击的图片,该图片可重定向到新网站。

My problem is the old website can be browsed in any web browser while the new web site must only be opened using a specific web browser (due to the developers of the new web site said that it only works properly on google chrome). 我的问题是旧网站可以在任何Web浏览器中浏览,而新网站只能使用特定的Web浏览器打开(由于新网站的开发人员说,它只能在google chrome上正常工作)。

All I need is when when they browse the old web site using whatever browser they have, and then click the image, it will open the new website using google chrome. 我所需要的是,当他们使用现有的浏览器浏览旧网站,然后单击图像时,它将使用google chrome打开新网站。

These web sites are published on the company's windows server, and all clients that connects to it has google chrome installed with them. 这些网站在公司的Windows服务器上发布,并且与其连接的所有客户端都安装了Google chrome。

If there is something like: System.Diagnostics.Process.Start("chrome.exe", <url>); 如果存在类似的内容: System.Diagnostics.Process.Start(“ chrome.exe”,<url>); that will be executed on the client side (not on the server side), kindly advise. 请在客户端(而不是在服务器端)执行该命令。

This is not possible unless you have some client software that can receive a call from the website to launch Chrome. 除非您有一些客户端软件可以接收来自网站的调用以启动Chrome,否则这是不可能的。 My answer can be backed by this question about IE redirection to other browser. 我的回答可以通过支持有关IE重定向到其他浏览器的问题。 The accepted answer is absolutely correct. 接受的答案是绝对正确的。

The security risk would be too great and besides windows doesn't support that kind of linking. 安全风险将太大,而且Windows不支持这种链接。 You could write a "client" program that runs in the background waiting for a call from your website. 您可以编写一个在后台运行的“客户端”程序,以等待您网站的呼叫。 Then the client program could launch Chrome. 然后,客户端程序可以启动Chrome。

Hope this helps you! 希望这对您有所帮助!

Is it your problem ? 是你的问题吗? : you want to open your link via Google chrome . :您想通过Google chrome打开链接。 if yes , you cant do it ! 如果是的话,你做不到! because ASP.net , PHP and etc .. a server side language and cant do it ! 因为ASP.net,PHP等..服务器端语言而无法做到! , its not possible without have any application on clients . 没有客户端的任何应用程序都是不可能的。

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

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