javascript - Is document.referrer cross browser compatable? -


i'd use document.referrer informal referrer check. element cross brower compatible? browser throw error when trying reference document object?

the document.referrer property described in dom spec:

http://www.w3.org/tr/dom-level-2-html/html.html#id-95229140

so should supported cross-browser. however, can detect if implementation support property like

if( 'referrer' in document ) {      console.log(document.referrer); } 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -