Closed casebenton closed 8 years ago
I think I'd leave the urls in the data file without www.
, and instead of using ===
to check the domain, check that the current domain ends with the target domain. That way subdomains automatically work the way most people would expect, and you can still be more specific if you need to (addons.mozilla.org
vs mozilla.org
for example).
Isn't that what caused #79 in the first place?
Oh, good point. To do what I said you'd need to be a little more clever and look at the dots in the hostname. I'm not sure if that is worth it. What do you think @casebenton?
I think that it could be useful in the future to have a robust system that includes subdomains, but for now the current technique in this PR is sufficient for the recommendations we are providing (seeing as most of the target domains don't really have prominent subdomains).
While this system isn't ideal compared to something that would handle subdomains well, do you think that it's alright if we use it for this study? In my testing it worked on all of the target domains.
Yeah lets go with this. I proposed the subdomain idea because originally I thought it would be pretty easy.
@Osmose or @mythmon r?