Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Disable bookmarking?

Basically, I'm looking for a way to stop a user to bookmark a page. Is there a way to disable/disallow a user to bookmark a page? If there isn't a way to do it, what other way can I prevent a user from bookmarking a url that leads to a download that only a site member should have access to.

For example, I would like to prevent a situation where a member bookmarks a url and passes the url that could contain links to a downloads page to a friend who's not a member of the site.

Comments

  • dspencerdspencer Posts: 10Member
    Would it be better to use a Session Object to handle this? Can this be done using a Session Object? How would this be done using a Session Object?
  • FlakesFlakes Posts: 642Member
    : Would it be better to use a Session Object to handle this? Can this be done using a Session Object? How would this be done using a Session Object?
    :


    Session variable would work. You just populate a session variable after login, and check this variable in the download page. If its populated, allow the download else dont.

  • dspencerdspencer Posts: 10Member
    : : Would it be better to use a Session Object to handle this? Can this be done using a Session Object? How would this be done using a Session Object?
    :
    : Session variable would work. You just populate a session variable after login, and check this variable in the download page. If its populated, allow the download else dont.
    :
    :

    Ok Thanks. That works for a the dowload page in question. I just thought of another scenario. What if the user types in the path of the ZIP/PDF file in the URL address bar? I won't be able to validate against the Session variable, correct? Is there a way prevent a user from downloading a file by typing in the URL to the file? Or would I have to create some kind of script to some how "deliver/serve" the file to the user in order to prevent this special case?
  • FlakesFlakes Posts: 642Member
    : : : Would it be better to use a Session Object to handle this? Can this be done using a Session Object? How would this be done using a Session Object?
    : :
    : : Session variable would work. You just populate a session variable after login, and check this variable in the download page. If its populated, allow the download else dont.
    : :
    : :
    :
    : Ok Thanks. That works for a the dowload page in question. I just thought of another scenario. What if the user types in the path of the ZIP/PDF file in the URL address bar? I won't be able to validate against the Session variable, correct? Is there a way prevent a user from downloading a file by typing in the URL to the file? Or would I have to create some kind of script to some how "deliver/serve" the file to the user in order to prevent this special case?
    :


    Dont show the user the actual path, use a download page, which gets the name/id of the file only, and use the ADOD.Stream to send it to the user.

    This might be of help.

    http://aspalliance.com/409


  • dspencerdspencer Posts: 10Member
    : : Ok Thanks. That works for a the dowload page in question. I just thought of another scenario. What if the user types in the path of the ZIP/PDF file in the URL address bar? I won't be able to validate against the Session variable, correct? Is there a way prevent a user from downloading a file by typing in the URL to the file? Or would I have to create some kind of script to some how "deliver/serve" the file to the user in order to prevent this special case?
    : :
    :
    :
    : Dont show the user the actual path, use a download page, which gets the name/id of the file only, and use the ADOD.Stream to send it to the user.
    :
    : This might be of help.
    :
    : http://aspalliance.com/409
    :
    :

    Yes, that's a great example! I'll just need to change it from VBscript to JScript.

    One other question. Is it possible to store the downloadable file on a server but not within the docroot? For example, say the docroot on the server was C:sitesub-directory and I wanted to store/serve the downloadable file in C:downloads directory. Is that possible?
  • dspencerdspencer Posts: 10Member
    : : : Ok Thanks. That works for a the dowload page in question. I just thought of another scenario. What if the user types in the path of the ZIP/PDF file in the URL address bar? I won't be able to validate against the Session variable, correct? Is there a way prevent a user from downloading a file by typing in the URL to the file? Or would I have to create some kind of script to some how "deliver/serve" the file to the user in order to prevent this special case?
    : : :
    : :
    : :
    : : Dont show the user the actual path, use a download page, which gets the name/id of the file only, and use the ADOD.Stream to send it to the user.
    : :
    : : This might be of help.
    : :
    : : http://aspalliance.com/409
    : :
    : :
    :
    : Yes, that's a great example! I'll just need to change it from VBscript to JScript.
    :
    : One other question. Is it possible to store the downloadable file on a server but not within the docroot? For example, say the docroot on the server was C:sitesub-directory and I wanted to store/serve the downloadable file in C:downloads directory. Is that possible?
    :


    Thanks for all your help Flakes! I used the example as a model and changed it to Jscript into of VBscript.
Sign In or Register to comment.