烧瓶重定向新标签页 [英] Flask Redirect New Tab

查看:50
本文介绍了烧瓶重定向新标签页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道烧瓶重定向是否能够在新标签页中打开链接/URL?

Does anyone know if flask redirect is able to open a link / URL in a new tab?

@app.route('/test')
def my_page():

  return redirect('http://mylink.com', 301)

如果mylink网站在新标签页中打开,我是否有任何见解?

I would like if the mylink website opened in a new tab, any insights?

推荐答案

据我所知,这不是烧瓶问题.您必须在 html代码或使用

As far as I know that would not be a flask issue. You have to open a new tab within your html code or with Javascript.

示例: <a href="http://mylink.com" target="_blank">Link</a>

在这种情况下,服务器无法控制浏览器的功能.

The server has no power over what the browser does in this case.

这篇关于烧瓶重定向新标签页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆