Downloading a file via Location bar (possible can of worms)

Discussion of general topics about Mozilla Firefox
Post Reply
User avatar
Faux Pass
Posts: 103
Joined: November 7th, 2002, 5:50 am
Location: NYC
Contact:

Downloading a file via Location bar (possible can of worms)

Post by Faux Pass »

<i>Please imagine the following typical scenario:</i>

1. You receive the URL of a file you need. Example URL: (http://www.monstertrucks.ca/video/jurassicwheelie.wmv) Maybe somebody sent it to you in an email, or you have it written down, or it was on a webpage unlinked.

2. You enter the URL in the Location bar and hit enter (or click "Go") but-- oh no!-- your browser fills with gibberish. (I've heard this happens because of misconfigured servers.)

<b>Q: What is the easiest way to get this file?</b>

<i>For extra credit: </i><b>Q: What is the easiest way to get this file without leaving the browser?</b>

<i>*COUGH*</i>alt-enter<i>*COUGH*</i>

(Disclaimer: I Googled "right click" & "save as" for the above example. I have no affinity towards monster trucks.)
User avatar
laszlo
Posts: 5225
Joined: November 4th, 2002, 6:13 pm
Location: .de
Contact:

Post by laszlo »

As soon as the page starts filling with "gibberish", stop the transfer, go to "File > Save Page as...", save it, et voilà... you can view it locally (I did read your disclaimer; what a nice clip :wink:).
User avatar
Faux Pass
Posts: 103
Joined: November 7th, 2002, 5:50 am
Location: NYC
Contact:

Post by Faux Pass »

laszlo wrote:As soon as the page starts filling with "gibberish", stop the transfer, go to "File > Save Page as..."


Huh. I didn't think of that. And you don't have to wait for the whole page to load? Neat. Thanks.
old momokatte
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by old momokatte »

And now for something completely different. Throw this in a bookmark:

javascript:var uri=(prompt('Enter the address of the file you wish to download.',''));if(uri){document.write='<a href="'+uri+'">Download '+uri+'</a>';}

Click the bookmark, paste the URL in the dialog box, and right-click on the generated link to save it to disk.

Points for creativity? :)
User avatar
Faux Pass
Posts: 103
Joined: November 7th, 2002, 5:50 am
Location: NYC
Contact:

Post by Faux Pass »

momokatte wrote:Points for creativity? :)


Definitely. And for style.
Ted Mielczarek
Posts: 1269
Joined: November 5th, 2002, 7:32 am
Location: PA
Contact:

Cheap answer

Post by Ted Mielczarek »

wget -nd url

Maybe that's cheating, but it works for me. ;-)
User avatar
Faux Pass
Posts: 103
Joined: November 7th, 2002, 5:50 am
Location: NYC
Contact:

Re: Cheap answer

Post by Faux Pass »

Ted Mielczarek wrote:wget -nd url


You realize, of course, that you forfeit your extra credit with that answer? (And, in fact, <i>lose points</i> for making me <a href="http://space.tin.it/computer/hherold/">download wget</a>!)
User avatar
alanjstr
Moderator
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here
Contact:

Re: Cheap answer

Post by alanjstr »

Ted Mielczarek wrote:wget -nd url

Maybe that's cheating, but it works for me. ;-)


Damn, you took my answer.

My other option was to whip up a quick html page so I could right click the link.

Or email the link to myself and let Yahoo make it clickable.

I don't fiddle with the keyboard modifiers usually.
User avatar
Faux Pass
Posts: 103
Joined: November 7th, 2002, 5:50 am
Location: NYC
Contact:

Re: Cheap answer

Post by Faux Pass »

alanjstr wrote:My other option was to whip up a quick html page so I could right click the link.


That's what I'm used to doing.
old momokatte
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Re: Cheap answer

Post by old momokatte »

Faux Pass wrote:
alanjstr wrote:My other option was to whip up a quick html page so I could right click the link.


That's what I'm used to doing.


That's what I'm used to doing too...until I realized I could do it with javascript. I'll be using the javascript method from now on.
thebabelfish
Posts: 8
Joined: November 22nd, 2002, 9:08 pm

More javascript

Post by thebabelfish »

momokatte wrote:And now for something completely different. Throw this in a bookmark:

javascript:var uri=(prompt('Enter the address of the file you wish to download.',''));if(uri){document.write='<a href="'+uri+'">Download '+uri+'</a>';}

Click the bookmark, paste the URL in the dialog box, and right-click on the generated link to save it to disk.

Here's a custom keyword version of that. Put this in a bookmark with a custom keyword and then type the keyword, a space, and the URI of the file.

javascript:var uri='%s';document.write='<a href="'+uri+'">'+uri+'</a>';
Post Reply