I have an image which contains a link for a file. When you click on it, downloading that file will begin and you can see its link in Download manager softwares or etc. It is like this:
https://stackoverflow.com/File.rar
I want to hide this link and user can not see it and only he downloads it.
How to do it using HTML?
here is a sample for that image and its hyperlink:
<a href="https://stackoverflow.com/File.rar"><img src="https://stackoverflow.com/downloadbutton.gif" alt="" width="128" height="41" /></a>
Using only HTML it is not possible. In order to get the effects you desire, you’ll need to use a bit of scripting.
The following articles provide some solutions:
That being said, what you are trying to do seems like a workaround. I think there can be a better solution if you can more clearly state the actual problem. What is the end goal of this question? Why are you trying to hide the url?