Downloading a file via Location bar (possible can of worms)
- Faux Pass
- Posts: 103
- Joined: November 7th, 2002, 5:50 am
- Location: NYC
- Contact:
Downloading a file via Location bar (possible can of worms)
<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.)
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.)
- laszlo
- Posts: 5225
- Joined: November 4th, 2002, 6:13 pm
- Location: .de
- Contact:
- Faux Pass
- Posts: 103
- Joined: November 7th, 2002, 5:50 am
- Location: NYC
- Contact:
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
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?
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?
- Faux Pass
- Posts: 103
- Joined: November 7th, 2002, 5:50 am
- Location: NYC
- Contact:
-
- Posts: 1269
- Joined: November 5th, 2002, 7:32 am
- Location: PA
- Contact:
Cheap answer
wget -nd url
Maybe that's cheating, but it works for me. ;-)
Maybe that's cheating, but it works for me. ;-)
- Faux Pass
- Posts: 103
- Joined: November 7th, 2002, 5:50 am
- Location: NYC
- Contact:
Re: Cheap answer
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>!)
- alanjstr
- Moderator
- Posts: 9100
- Joined: November 5th, 2002, 4:43 pm
- Location: Anywhere but here
- Contact:
Re: Cheap answer
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.
- Faux Pass
- Posts: 103
- Joined: November 7th, 2002, 5:50 am
- Location: NYC
- Contact:
Re: Cheap answer
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.
-
- Posts: 0
- Joined: December 31st, 1969, 5:00 pm
Re: Cheap answer
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.
-
- Posts: 8
- Joined: November 22nd, 2002, 9:08 pm
More javascript
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>';