Re: Is it possible to disallow user to Bookmark a page ?



Hello,

You cannot prevent a user from bookmarking a page, but you can use your java
code to detect in the second page if there is already a session, If there is
no session, then just redirect the user to the first page.

See
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpSession.html#isNew()

--
Singapore Web Design
http://www.bootstrike.com/Webdesign/
Singapore Web Hosting
http://www.bootstrike.com/WinXP/faq.html
Windows XP FAQ

"Software Pulsar" <software.pulsar@xxxxxxxxx> wrote in message
news:1192513089.444720.221450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have two pages, called First and Second. I want to disallow
bookmarking my Second page. First page can be bookmarked if the user
wishes. User can reach both the pages by typing the URL. If the user
goes to the Second page from First page then Session information will
be maintained/communicated about the user to the server. Otherwise if
user goes directly to the Second page by bookmarking it at an earlier
time, then in Server, User information cannot be maintained.
And moreover First page is like Login page I can say, but exactly not
Login page. If the user reaches Second page via the button available
in First page then only we can keep track of the User. First Page can
be reached by typing URL or bookmarking.

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;
}

Actually, The code I have typed works fine with Firefox browser, But
it is not working in IE browser, as IE does not support this 'referer'
in the HTTP header(I don't know it exactly).

If any alternative for this 'referer' is available in IE means I can
implement the If condition, so that I can check whether the browser is
IE or FF and implement the logic accordingly. The thing is IE does not
support this 'referer', and it always returns null value. Where as the
Firefox returns null if the page comes via bookmarking otherwise some
value if it comes from First page.

I need solution for this bookmarking such that it works in both the
browsers,

Is it possible to disallow the user bookmarking a page then it is also
useful to me, so that I can implement that. My ultimate aim is to
prevent user from Bookmarking my Second page. Or even if User
bookmarked it then disallow user to access that page.


Please help me out in this situation. Thanks in advance.



.



Relevant Pages

  • Re: Is it possible to disallow user to Bookmark a page ?
    ... Here's a link to a classic ASP solution. ... user goes directly to the Second page by bookmarking it at an earlier ... it is not working in IE browser, as IE does not support this 'referer' ... If any alternative for this 'referer' is available in IE means I can ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Is it possible to disallow user to Bookmark a page ?
    ... user goes directly to the Second page by bookmarking it at an earlier ... it is not working in IE browser, as IE does not support this 'referer' ... If any alternative for this 'referer' is available in IE means I can ... Is it possible to disallow the user bookmarking a page then it is also ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: single page apps, URL hash setting, bookmarking, & the back button.
    ... bookmarking of url's to return to a given page in a web site/app in a ... Your argument is that this functionality shouldn't even be required, ... ignore those browser problems and just not support those browsers. ... if it already works _with_ these hacks? ...
    (comp.lang.javascript)
  • How 2 identify Bookmarked web page URL and normal one
    ... The thing is that in Firefox this 'referer' is the one that specifies ... bookmarking, otherwise some value. ... null in IE because IE does not allow (this is because of security ... identify the Bookmarked link access and the normal link access. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)