-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible limitations #20
Comments
Hi @Gregoirevda,
Yett is supposed to be loaded in a blocking manner before other script tags are parsed. Attributes like
I don't think that the CORS request contains cookies by default unless the tag has a crossorigin attribute. The response can set cookies if it has a |
You're right, this made it more clear to me:
<script src="https://my-blacklisted-domain.com/file.js"></script> If |
Can you try using the <script src="https://my-blacklisted-domain.com/file.js" crossorigin="anonymous"></script> To reproduce
elt = document.createElement("script");
elt.src = "https://unpkg.com/yett@0.1.11/dist/yett.min.js";
document.head.appendChild(elt); Notice that the cookies were sent: Host: unpkg.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0
Accept: */*
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
DNT: 1
Connection: keep-alive
Referer: https://snipsco.github.io/
Cookie: toto=titi
Pragma: no-cache
Cache-Control: no-cache
elt = document.createElement("script");
elt.src = "https://unpkg.com/yett@0.1.11/dist/yett.min.js";
elt.crossOrigin = "anonymous";
document.head.appendChild(elt); Notice that the cookies are not sent anymore. Host: unpkg.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0
Accept: */*
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate, br
Origin: https://snipsco.github.io
DNT: 1
Connection: keep-alive
Referer: https://snipsco.github.io/yett/
Pragma: no-cache
Cache-Control: no-cache |
Agreed, Thank you for your quick replies! |
Could be worth documenting the |
@pocketjoso Yeah it could be useful, I'll add something 👍. |
Something else that might be good to mention is that Will be loaded before all other |
script
tag has theasync
attribute, it will be downloaded in parallel and could be executed before the Yett script. TheMutationObserver
will be registered after the script and therefore not prevent its execution.Since all
script
's are downloaded (even if not executed), they still send all third-party cookies with the HTTP GET to download the script. Which lets the 3th party know which websites you visit.The text was updated successfully, but these errors were encountered: