I've been used to dragging the icon to the left of the URL in a web browser to a folder and it gets stored as an internet shortcut on Windows. You can do the same in Safari on the Mac and it is saved as a webloc file. However, the URL part is stored in the resource fork. In order to get a more portable webloc file in which you can view the stored URL as plain text, you should drag the full text of the URL to Finder. This still results in a webloc file, but the URL is readable as plain text so that you can open the webloc file in a text editor.