I have First Page which if the user wishes can bookmark to access the
page. And the First page has button which allows to go to the Second
page. This Second page should not be allowed to bookmark. Bookmarking
should result in error for Second page.
so whenever user bookmarks Second page and at a later time opens that
bookmarked page then User should not be allowed to access the Second
Page. I used the following code in java file.
String refererPath = request.getHeader("referer");
// Dont allow the user to see the bookmarked web page.
if (refererPath == null) {
setContent(gen_error .....".CANT-BOOKMARK")));
return null;
}
The thing is that in Firefox this 'referer' is the one that specifies
whether URL is bookmarked and accesed(via bookmarked pages/favorites)
or the other way. This 'referer' gives null if it is accesed via
bookmarking, otherwise some value. But this 'referer' gives always
null in IE because IE does not allow (this is because of security
reason as it is said in IE docs. )
I need solution to solve this issue. Can anyone suggest me how to
identify the Bookmarked link access and the normal link access. I want
the user to prevent bookmarking in my Second Page. But allow
bookmarking in First page.
Many Thanks in Advance.
|