var ref = document.referrer; window.location.href ="index.html?&ref="+ ref ;