You can get referrer by using document.referrer
var referer = document.referrer;
var refEscaped = escape(referrer);
So this will be what you need :
$(document).ready(function () {
if(document.referrer.indexOf("https://www.exact-url.com/") > -1 || window.location.href.indexOf("/index.htm") > -1) {
alert("Your are on the start page");
}
});
solved Javascript: check if the referer url is exactly like