so I have a question and I can't find an answer.
So I have a domain dario1.com which has a button that redirects to dario2.com
dario2.com has an JS code to tell the referrer and if te referrer is dario1 it will run a JS. And that works perfectly.
var ref1= document.referrer;
var search = "dario1";
if (ref1.indexOf(search) > -1)
src= attribute is basically telling your client to request the code from a particular location and run it locally. It does not matter where the code comes from, it will always be run the same!
The only way to access where the code came from (see what is inside the
src attribute), is to look at the dom itself.
So to recap, the code you have pasted in your question will always run exactly the same, no matter where is was requested from.