document.referrer gives you the URI of the page that linked to the current page. This is a value that’s available for all pages, not just frames.
window.parent gives you the parent frame, and its
location is its URI.
If you want to find the URI of the parent frame, then use