开发者

Change URL of Bookmark when user Bookmarks page [duplicate]

This question already has answers here: Using JavaScript to change the URL used when a page is bookmarked (6 answers) Closed 8 years ago.

I'm trying to change the URL of a bookmark so that when the user bookmarks a page, it actually bookmarks a different URL that the user must p开发者_开发知识库ass through first. Is that possible with javascript or any other languages?


No. Bookmarking is a functionality implemented in the browser, the HTTP client. It will bookmark what the user commands the browser to do. This almost always in all browsers is the URL displayed in the address field.

So it is normally not possible within a browser to manipulate the storage of the bookmark.

However depending on what you try to achieve, your application can provide URLs that only work for a fraction of time. If bookmarked and that amount of time has passed, your application does know that this is an older, hence assumable a bookmarked URL. You can then make your application react to that, offering an additional page a user must pass through.

This can be done with some sort of session as well, and combined with referrer checking.


No, you can't change a user's bookmark, but you can make sure the user gets to the new page by doing a proper 301 redirect.


Well you can try to hijack the Ctrl+D command to bookmark.

Anything farther than that is not really feasible since bookmarking is usually handled by the browser and not the website.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜