Is it possible to get session referrer?


#1

Is it possible to get the referring URL? document.referrer seems to not really jive with meteor or am i doing something wrong? I simply am looking for a way to determine if a user is coming from the “parent” domain of the client.


#2

You can check location.pathname or location.href


#3

Thanks Nick but that get’s me the current path or the current URL. I’m looking to get where the user came from when they landed on the site.


#5

I think the problem is that you are using the force-SSL package. Because it is secure, the browser does not allow you to find the document.referrer field.


#6

Thanks Nick. That package wouldn’t affect cookies would it? If I set a cookie on the “parent” domain to reference in the app I should be able to get the same result? I totally forgot about the SSL issue.


#7

I think that it won’t affect cookies, as the Meteor accounts system uses cookies to allow you to be automatically logged in after you closed and reopened the browser window.


#8

The Meteor accounts system does not use cookies, it uses local storage.