Microsoft Edge Copy Title and URL of a Web Page [Bookmarklet]

There are several third-party extensions out there to copy webpage title and address, for browsers like Chrome, Firefox and others. Here is a neat trick to add your own Copy Title & URL bookmarklet for Microsoft Edge.

Open Microsoft Edge, visit a website and add it to the Favorites bar. Name the favorite as Copy Title & URL, or anything as you’d like.

edge copy title and url bookmarklet

Now, we’ll change that favorite’s target to a javascript code, which copies the page title and URL of the current tab. As of Windows 10 Fall Creators Update you can edit the URL of an existing bookmark in Edge. To do that, right-click on the bookmark and click Edit URL. Type in the following javascript code and press ENTER:

javascript:window.prompt("Copy Title & URL",document.title + " : " + location.href);void(0);

Using Windows 10 v1703 and earlier?

In Windows 10 versions 1703 and earlier, Edge doesn’t provide an option to edit the target path of favorites. So, we’ll make use of the EdgeManage utility.

Before that, close all instances of Microsoft Edge, and then start EdgeManage.

edge copy title and url bookmarklet

Edit the “Copy Title & URL” target URL, and set it to as follows:

javascript:window.prompt("Copy Title & URL",document.title + " : " + location.href);void(0);

The above javascript code gets the title and website address of the current webpage and shows it in a text box which you need to copy (CTRL + C)

Exit EdgeManage and commit changes to the database when it prompts you.

Start Microsoft Edge, visit a website and then click the Copy Title & URL bookmarklet you created.



edge copy title and url bookmarklet

You’ll be shown the following prompt with a text control box, showing the title, which is followed by the URL of the webpage. The text range is automatically selected for you.

edge copy title and url bookmarklet

Due to security restrictions, javascript can’t copy stuff to the clipboard directly without user’s consent, and hence the additional prompt above. Likewise, a new line or carriage return doesn’t seem to work in Edge. So the Title and URL will be outputted in a single line as below:

Lifehacker - Tips and downloads for getting things done : http://lifehacker.com/

All you need to do is press CTRL + C to copy the text to the clipboard and dismiss the dialog by clicking OK or pressing the ESCAPE key.

That’s it. You’ve added your first bookmark-let in Edge! Edge has just got extensions support since the Anniversary Update. So you may soon get a full-fledged “Copy Title and URL” browser extension from the Store.

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.

Leave a Comment