Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I google for images of "apple sauce" (without the quotes), Safari's location bar just displays "apple sauce" (without the quotes) rather than the URL leading to Google searching for apple sauce images.

I want to send someone the search URL. How can I get it from Safari?

share|improve this question
1  
There are several answers to your question here: apple.stackexchange.com/questions/58225/… the web inspector window has an URL that you can copy if you don't like the various JavaScript options... –  bmike Aug 5 '12 at 0:05
    
This solution works great for me: apple.stackexchange.com/a/59505/10074 –  Stefan Schmidt Aug 21 '12 at 14:03
1  
Yes, Ive found this bug in safari extremely annoying –  Jeff Burdges Sep 9 '12 at 17:51

4 Answers 4

up vote 0 down vote accepted

Like suggested elsewhere, you can drag the magnifying glass into some plain text view. However, one can also directly drag it into a (rich text) email or chat message. Or into Google's search field which is conveniently close to Safari's location bar:

Dragging search terms into search field

After dragging into Google's search field, Safari's location bar is still focussed. But in the search field only the URL is selected, hence easily copied when right-clicking that gray selection:

After dragging

One could also first hit Tab after searching (to go into the search field), hit Delete to clear it, and then drag the icon. After that, the search field is ready for Command+C:

After dragging when first clearing the field

When using Messages (formerly known as iChat), the Share button at the left of the location bar can also share the URL:

Safari 6 in Mountain Lion Share button

Share dialog

As an aside: the Google URLs include a lot of irrelevant things, specific to your browser, language, etc. Often, it's enough to use www.google.com#q=elvis+is+alive, or for image search www.google.com#tbm=isch&q=elvis+is+alive, but then one needs to change the spaces into plus-characters to ensure it's clickable. (And one also needs to percent-encode other special characters.) It would be nice if Google would provide some bare sharing link on its own site.

share|improve this answer
    
Thanks. I never noticed that. –  Andrew J. Brehm Aug 11 '12 at 20:57

You could also drag the favicon to a plain text view.

Or assign a shortcut to a script like this:

tell application "Safari" to URL of document 1
set the clipboard to result
share|improve this answer
    
No Elvis fan? ;-) –  Arjan Aug 11 '12 at 14:46

I've created a Safari Extension: Get URL that highlights the current URL. It's less invasive than a bookmarklet and it's pre-selected, too.

share|improve this answer

It's not a very elegant solution, but you can make a bookmarklet that will open a pop-up dialog with a copiable version of the URL.

To do this, bookmark any page you happen to have handy, then open the Bookmarks manager (Bookmarks > Show All Bookmarks), and edit the address of that bookmark to be javascript:alert(location.href);. Change the name to whatever you want.

Then when you click it, you should get a popup that looks like this: example popup

share|improve this answer
1  
javascript:prompt("Here's your URL", location.href) is even easier. –  Arjan Aug 5 '12 at 10:38
1  
Even better, when you put this on the bookmarks bar, it's automatically assigned a hot key. By pressing [command] + [#] (where the # is it's location from left to right) you can open it. For example [command]+[5] will open the 5th thing on the book marks bar –  XAleXOwnZX Aug 10 '12 at 18:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.