简体   繁体   English

带锚的request.referer

[英]request.referer with anchor

is there a way to get the referer with the anchor from the referer page.. 有没有一种方法可以从引荐来源页面获取带有锚点的引荐来源。

the situation is - i have a search page which loads results (users) below the search box using ajax. 情况是-我有一个搜索页面,使用ajax在搜索框下方加载结果(用户)。 i am changing the hash/anchor on the fly when the search keyword is typed in. 输入搜索关键字时,我正在即时更改哈希/锚。

so it becomes http://localhost/users/search#foo 因此它变为http:// localhost / users / search#foo

the user gets link in the ajax result to edit the user. 用户获得ajax结果中的链接以编辑用户。 i want the user to come back to this same search result after he is done editing the user. 我希望用户在完成用户编辑后返回到相同的搜索结果。

Anchors are not included in the referrer. 推荐人未包含锚点。 You'll need to use query parameters or define the return URL (with the anchor) in the session before updating the user. 在更新用户之前,您需要在会话中使用查询参数或定义返回URL(带有锚)。

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

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