I used window.history.go(-2)
it redirects but I don't want to redirect I want to print the URL (to know the referrer), Example: I'm navigate file1->file2->file3
, I wrote the script window.history.go(-2)
in file3
, and I want the alert as 'file1'
. Can anybody help me please?
If not possible is there a way to get the referrer URL, and I'm in a iframe, from the frame I want the sites referral URL.