如何检查页面是否已添加书签

时间:2021-02-01 07:16:03

Without resorting to using an ActiveX or some other kind of client side coding:

无需使用ActiveX或其他类型的客户端编码:

Is it possible to determine if a visitor to a website arrived to a page via his bookmarks or the home page?

是否可以通过他的书签或主页确定网站访问者是否到达页面?

Personally I think its impossible, but I would like to be sure or proven wrong.

我个人认为这是不可能的,但我想确定或证明是错误的。

The way I am doing something like this at the moment is:

我此刻做这样的事情的方式是:

Request.UrlReferrer

If I don't find anything there, I currently deduce the user had me bookmarked.

如果我在那里找不到任何东西,我现在推断用户有我的书签。

4 个解决方案

#1


Short answer, no.

简短的回答,没有。

Long answer, not in a portable foolproof manner.

答案很长,不是以便携式万无一失的方式。

#2


Not a foolproof way. But, you can set the bookmark to have a querystring. e.g. *.com/?bmark=y

不是万无一失的方式。但是,您可以将书签设置为具有查询字符串。例如*.com/?bmark=y

And on server side, you can check for this.

在服务器端,您可以检查这一点。

#3


Same short answer as Pax.

和Pax一样简短的回答。

Long answer... unfortunately, it is possible to some extent in IE. You can use the saveFavorite persistence behavior to try to store some data and then see if you get it back later. If you do, your page load was from a bookmark.

很长的答案......不幸的是,IE在某种程度上是可能的。您可以使用saveFavorite持久性行为来尝试存储一些数据,然后查看是否稍后将其恢复。如果这样做,您的页面加载来自书签。

You can also detect whether your page is the user's homepage - though this doesn't necessarily mean that they arrived at your page using that method - using the isHomePage method on the homePage behavior.

您还可以检测您的页面是否是用户的主页 - 尽管这并不一定意味着他们使用该方法到达您的页面 - 在homePage行为上使用isHomePage方法。

Please don't, though. It's violently horrible. IE's “default behaviors” are an abomination unto the Web.

不过请不要。这太可怕了。 IE的“默认行为”是对网络的憎恶。

#4


There is away but it requires a clickstream datawarehouse that also parses your webserver log files at a suffcient rate.

还有它,但它需要一个点击流数据仓库,它也能以足够的速率解析您的网络服务器日志文件。

Most that I have seen do ETL on log files in a +24h routine so the best guess is that this vistor used there bookmark last time. But then if its important to the business that you see if they used a bookmark there may be a case for +Mins ETL

我见过的大部分都是在+ 24h例程中对日志文件进行ETL,所以最好的猜测是这个vistor上次使用了书签。但是,如果它对你看到的商业很重要,如果他们使用了书签,可能会有+ Mins ETL的情况

But this is not fool proof either and you get the issues with IP address ranges et al but....

但这也不是万无一失的,你得到IP地址范围等问题,但......

The Fav Icon can be used as this will be a get request on the webserver for an IP which you can also tie up to log on or other tracking mechanism

可以使用Fav图标,因为这将是网络服务器上的IP请求,您还可以绑定登录或其他跟踪机制

#1


Short answer, no.

简短的回答,没有。

Long answer, not in a portable foolproof manner.

答案很长,不是以便携式万无一失的方式。

#2


Not a foolproof way. But, you can set the bookmark to have a querystring. e.g. *.com/?bmark=y

不是万无一失的方式。但是,您可以将书签设置为具有查询字符串。例如*.com/?bmark=y

And on server side, you can check for this.

在服务器端,您可以检查这一点。

#3


Same short answer as Pax.

和Pax一样简短的回答。

Long answer... unfortunately, it is possible to some extent in IE. You can use the saveFavorite persistence behavior to try to store some data and then see if you get it back later. If you do, your page load was from a bookmark.

很长的答案......不幸的是,IE在某种程度上是可能的。您可以使用saveFavorite持久性行为来尝试存储一些数据,然后查看是否稍后将其恢复。如果这样做,您的页面加载来自书签。

You can also detect whether your page is the user's homepage - though this doesn't necessarily mean that they arrived at your page using that method - using the isHomePage method on the homePage behavior.

您还可以检测您的页面是否是用户的主页 - 尽管这并不一定意味着他们使用该方法到达您的页面 - 在homePage行为上使用isHomePage方法。

Please don't, though. It's violently horrible. IE's “default behaviors” are an abomination unto the Web.

不过请不要。这太可怕了。 IE的“默认行为”是对网络的憎恶。

#4


There is away but it requires a clickstream datawarehouse that also parses your webserver log files at a suffcient rate.

还有它,但它需要一个点击流数据仓库,它也能以足够的速率解析您的网络服务器日志文件。

Most that I have seen do ETL on log files in a +24h routine so the best guess is that this vistor used there bookmark last time. But then if its important to the business that you see if they used a bookmark there may be a case for +Mins ETL

我见过的大部分都是在+ 24h例程中对日志文件进行ETL,所以最好的猜测是这个vistor上次使用了书签。但是,如果它对你看到的商业很重要,如果他们使用了书签,可能会有+ Mins ETL的情况

But this is not fool proof either and you get the issues with IP address ranges et al but....

但这也不是万无一失的,你得到IP地址范围等问题,但......

The Fav Icon can be used as this will be a get request on the webserver for an IP which you can also tie up to log on or other tracking mechanism

可以使用Fav图标,因为这将是网络服务器上的IP请求,您还可以绑定登录或其他跟踪机制