-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Pages using VWO.com for A/B testing delay before rendering #5268
Comments
cc: @snyderp |
@snyderp pattern for the script that should be replaced as polyfill is |
This will also happen on a sig subset of these sites: https://publicwww.com/websites/dev.visualwebsiteoptimizer.com/ Triggered by how we do blocking (reporting success and returning nothing). Will come up with a polyfill now for a short term fix |
As far as I've been able to find out, there isn't any JS API that would call into the script loaded by j.php. I believe that if the polyfill would contain Is there an alternative for these kinds of platforms (Google Optimize, VWO.com) that would be a better fix for the long term? |
One long term solution we're deploying soon is to support the uBO format for these, so that we can share effort with that project. Longer term, we're thinking of a number of ways we can respond dynamically |
I put together a PR for this last night: brave/brave-core#2956 But the big problem is the current way of doing pollyfils (changing the URL of the resource to be a JS url, and having an empty body) breaks a bunch of CSP policies. @bbondy @AndriusA or @bsclifton might have an idea of how to best proceed: e.g
Also alarming, since we haven't disabled CSP reports, we're probably generating lots of CSP violation reports for the existing polyfills too, which is a bad look… |
As an extra bit of "funny", triggering the CSP error actually fixes this problem, since it causes the "error" event on the script to trigger, instead of the load event… but, thats a bug fixing a bug… |
I think this is also true then for all uBlock users? They also use a similar approach right? With 307 internal redirects? |
We could trigger 'any' error on the script then, at least for the cases where we know the default implementation of the script handles errors and has a fallback. Simple EDIT: It seems uBlock is doing exactly that: |
@jeroenvisser101 thats what Brave used to do :) the problem is that just as many scripts operate in the opposite way, and give the negative outcome if you trigger the error path, instead of the success path (google analytics for example). Still digging / thinking what a more general solution might look like |
I might be wrong but maybe we could add an extra check here to match async render blocking scripts somewhere here: Seems like if we can return |
Sure, we can def return different values ;) The point is just that sometimes scripts do the bad thing if you block them hard (i.e. Current ideas (all speculative at this point) are
None super appealing, but being worked on :) |
@pes10k duplicate? sounds like this has already been fixed by us returning |
Yep, looks fixed. I'll close. Thanks for the catch @antonok-edm |
Similar to #4402, but related to A/B testing code from VWO
Description
Sites using VWO.com for a/b testing, when loaded with shields up, will show up as a blank page while VWO waits for its experiment code to load. Only after a set timeout (which defaults to around 2 seconds), it will show the page as a fallback.
Steps to Reproduce
Actual result:
Page is shown after delay.
Expected result:
Page is shown immediately after loading.
Reproduces how often:
100% of the time
Brave version (brave://version info)
All channels.
Other Additional Information:
Miscellaneous Information:
Calling
_vwo_code.finish()
signals to the page that it can be shown and is used in the VWO experiment code as fallback incatch
statement.The text was updated successfully, but these errors were encountered: