3

Say I find a link to a .pdf file on a webpage. I can right-click and "save as" to save the file without Firefox actually loading the .pdf in the browser.

But suppose I only have the text of the URL. I could paste it in the navigation bar, let Firefox load the .pdf, and finally hit "save", but is there a way to save it without letting Firefox load it?

In the past I've gotten around this by making a text file with the URL in a link tag to "save as", but I wonder if there is a better way.

2 Answers 2

2

A kinda hackish way is to use a bookmarklet.

I just created one that pops up a prompt for the URL (http:// is necessary). When you enter it, it will create a popup box with a hyperlink to that URL or, if that popup already exists (i.e. you've used the bookmarklet on the same page before) it will add the hyperlink to that box.

var bkm_url=prompt("URL:", "http://");
if (bkm_url!=null) {
    if (typeof(bkm_nw)=="undefined"||bkm_nw.closed){
        var bkm_nw=window.open("", "", "width=200,height=50");
    }
    bkm_nw.document.write("<a href=\""+bkm_url+"\">"+bkm_url+"</a><br/>");
    bkm_nw.focus();
}

To add as a bookmarklet, you can use this site and drag the link at the bottom into your bookmarks toolbar. THen just click the bookmark and use. Alternatively, you can directly add a bookmark to this location.

javascript:var bkm_url=prompt("URL:","http://");if(bkm_url!=null){if(typeof(bkm_nw)=="undefined"||bkm_nw.closed){var bkm_nw=window.open("","","width=200,height=50");}bkm_nw.document.write("<a href=\""+bkm_url+"\">"+bkm_url+"</a><br/>");bkm_nw.focus();}

Unfortunately, I don't think there's a way to force a file to download without server side support (MIME type manipulation), so you'll still have to use Save Link As... with this. On the plus side, it should work with every major browser (barring overzealous popup blockers, in which case it can be modified to print inside the current window instead of using a popup). In any case, better than creating a HTML file every time you need to download something by link.

1

If you don't want to open PDF files in the browser then configure Firefox to save the pdf files that way any PDF file will be saved.

The option is in Tools/Options/Applications the filter the list by PDF and change the option to "Always Ask"

Also you may need to disable the Adobe Reader plugin (Tools/Add-ons/Plugins)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .