Controlling the 'Save Link as' option in browsers - html

I have a website with MP3 files in a page. There is an MP3 player built using HTML5. My users are able to play the songs without any problem but they are also able to download the MP3 files by using 'Save Link as' option from the browser. (Right click on MP3 'Save Link as').
I was thinking it is not possible to hide "Save Link As" until now when I ran into this page: http://www.codebasehero.com/files/music-player-1.0.1/demo/
This page has a similar player like mine (no flash). If I right click on the MP3 link, the 'Save Link as' option doesn't appear. Does anyone know how they managed to hide "Save Link as"?

Simple: the "links" on the site you mentioned are not links at all, they're <span> elements. There's probably some JavaScript to make they play the songs when clicked. If you check their "buy" links, those are actual links, and the browser will show the Save As option on right-click.

Related

is it possible to make an hyperlink to only download a pdf file?

I have an hyperlink to a pdf form that can not be opened by the browser's pdf viewer. If clicked, the browser tries to show it but I get the error message like "it is necessary Acrobat Reader 8.x" etc. Is there a way to force an hyperlink to such pdf form file to only allow its downloading? In this way, the user could open it with his local Adobe Reader.
Let’s say you have a PDF that you want to let people download. The file will be like this:
Download Receipt
In most browsers, clicking on the link will open the file directly in the browser.
But, if you add the download attribute to the link, it will tell the browser to download the file instead.
<a href="/path/to/your/receipt.pdf" download>Download Receipt</a>
The download attribute works in all modern browsers, including MS Edge, but not Internet Explorer.
In the latest versions of Chrome, you cannot download cross-origin files (they have to be hosted on the same domain).
To make the hyperlink to download the pdf file when clicked, you should use download property inside the anchor tag. For example you can see the code below:
Download the pdf file
You can also give your own name to the downloadable pdf file in the download property that I provided as 'Document' in the code above.
Yes, it is possible. First download the file and then you'll see a link when it downloaded(it disappears quite quickly) just copy it and use:
hyperlink

Download an image instead of opening it in new tab

I am trying to download an image on click and using "download" attribute of HTML5 for this. But it is redirecting the user to a new tab instead of downloading the image.
Click to Download
How can I sort out this issue?
I tried to change the path from the href attribute to download and it worked Click to Download

How to save rendered fonts?

How would I save rendered fonts from websites? I tried ctrl + s on Chrome then saved the page and it didn't save the rendered font... I used inspect element on the saved page and there's a lot of these errors that say "Failed to load resource: net::ERR_FILE_NOT_FOUND" about the fonts on console... Could someone please help me? I really want the fonts that htmlBurger uses on the text "YOUR CODING SERVICE" so that I can use it on my website.
On that page (htmlBurger), just open DevTools (In Chrome it's Ctrl+Shift+I) and go to Sources tab. From right navigation go to:
htmlburger.com > assets > fonts/tungsten-rounded
Then select font you want to download and right click it and choose Open in new tab. It should automatically download font.

Embed PDF to HTML object tag is hidden floating bar at the first time

I have an issue about embed PDF link to HTML <object> tag.
The floating bar is like that.
At first time the page loads, the floating bar is hidden even though I roll over this position.
When I refresh page (press F5) then the floating bar is shown again.
I have tried <iframe/> <embed/> tags, however they can't solve this problem.
P/s: My customer don't allow to use PDF.js
The option to disable/enable the read mode is controled by adobe and not by browser or html/js. Client have the option to change things how to view the document. Perpahs the correct way to enable/disable floating bar by doing this:
Quit your internet browser
Launch Acrobat (or Reader)
Choose Edit>Preferences
Click on the Internet category on the left
Deselect “Display in Read Mode by default”
Click the OK button.
Relaunch Acrobat
Something important to note, if you have both Adobe Acrobat and Adobe Reader, you need to do the above in both programs (same steps).

Chrome mediaelement.js stream and download link conflict

I'm having trouble getting audio streams and download links (for the same file) to play nice on a page in Chrome.
http://500mixes.com
For each audio file, I have a separate player and download link. The player is mediaelement.js. The problem is that clicking on the download button stops the stream. But the opposite (download, then stream) works fine.
I know one solution would be to use a modal pop-up to pull the download link out of the page. But I'm hoping to find an inline solution. Does mediaelement.js have native download functionality?
Thanks!
I haven't looked at your code yet, so this assumes you aren't doing anything strange...
If you link to a download, the browser will often begin the process of shutting down the current page in order to go to the next page. This is a reasonable optimization, since most links are pointing to other pages, not downloads.
To get around this, set the target of your download links to _blank. This opens the download link in a new window. Note that a simple modal dialog on the same page will not work. You must set the target to somewhere else.
Alternatively, add a hidden <iframe> to your page and set the target of those download links to it.
I have been having the same problem, the download link shows but is not clickable. Simply adding target="_blank" within the URL makes the link clickable and makes the file downloadable. Thanks.