-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
Expose if loading failed because of an error or because of a blocker #50
Comments
Are you trying to determine if a script was blocked by an ad blocker or something else? |
Yes, I'd like to know if it was blocked by an ad blocker. Particularly, if a script was added to pathsNotFound by the logic here https://github.com/muicss/loadjs/blob/master/src/loadjs.js#L166. |
It should be easy to modify the library to return that information but I'm not sure we can reliably detect blocked scripts so I've actually been thinking about removing that code from the library altogether (unless we can fix it). Here's the github issue: |
OK, I see. I did look at that issue before posting but didn't know you were looking to remove the detection. Has there been any additional testing to verify that the detection isn't working or if it's specific browser/ad blocker combos that it doesn't work for? |
I haven't had a chance to look too closely at the issue yet. Do you know of any libraries that can detect blocked scripts that work across browsers/adblocker? |
Sorry, I don't know of any off the top of my head. |
I might have a play with different adblockers and browsers when I get some time, and report back with any findings. |
Great! Let me know. |
I tested uBlock, Adblock, Adblock Plus, and Ghostery on Chrome, Firefox, and Safari (all on Mac). |
Great, thanks for doing the research! I guess that answers the question about whether or not we can detect if a script was blocked by an ad blocker or if the download failed for another reason. I'm still concerned about our ability to detect all blocked scripts as highlighted in this issue: #47 |
I've not seen the issue described in #47. Loadjs always fired the correct success/error callback in my tests. |
Hi! I'm using loadjs (great library btw) and I'm seeing some infrequent loading failures in the logs. I'm trying to establish if it's caused by something blocking the scripts or if they are failing to load for some other reason.
The
loadFiles
function already has logic to detect blocked scripts but it does not expose this information, only which scripts were blocked, if any. I'd like to be able to add this to the logs to better diagnose the what causing the failed script loads.What do you think?
The text was updated successfully, but these errors were encountered: