[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 706
  • Last Modified:

Hide a download link

On my site I have a form that users fill out with contact information. Once they fill it out I display the link to a pdf file that is hosted on another site for the users to download.

Unfortunately this link has been shared around and people aren't providing their contact information.

I need a way in either asp.net or Javascript to do the file download without showing the link so I can force more people to provide their contact info.

I can get the owner of the other site to change the link but contractually the pdf file has to live on their website.

Can anyone point me to some ideas?
0
EndeavorToPersevere
Asked:
EndeavorToPersevere
2 Solutions
 
GwynforWebCommented:
A very simple idea is

<a href="#" onclick="location.href='http://google.com' ">

The URL is not displayed to the user, to get the URL they would have to go through the code.
0
 
RycatJonesCommented:
Question: Contractually it has to reside on their server...
But can your server read it from their server and then deliver it to the user?

If so, then your server can  programmatically create a URL that's good for..say 30mins
When you hit it, the ASP script checks the expiration based on filename or lookup table in database or memory and if it's still good, downloads the file from source server and delivers to customer...(Twice the download time)

If you contractually cannot do that, then...
You can only hide it so far...

You can program links that live and die (expire) on your server that redirect to the final link.
But anyone with half a brain will pick up on the redirect and find the true link.
0
 
EndeavorToPersevereAuthor Commented:
Thanks for the ideas.

Unfortunately I can't read the other server but thankfully this doesn't really have to be that secure we are just encouraging more people to provide contact info. So if they want to view the source code to get the link or email the pdf once they have it so be it.

I'll use your ideas to make it a bit more secure and hopefully get more link registrations.

Thanks!
0
 
informaniacCommented:
Can the link of the pdf be shared? What happens if the link to pdf file is shared?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now