Skip to content
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

Impact of third-party render blocking scripts #33

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mukeshpanchal27
Copy link
Collaborator

@mukeshpanchal27 mukeshpanchal27 commented Jan 10, 2023

Fixes #30

Query results

Row percentile client host num_requests
1 10 desktop first party 8
2 10 desktop third party 4
3 25 desktop first party 16
4 25 desktop third party 10
5 50 desktop first party 32
6 50 desktop third party 22
7 75 desktop first party 56
8 75 desktop third party 42
9 90 desktop first party 86
10 90 desktop third party 68
11 100 desktop first party 3320
12 100 desktop third party 11578
13 10 mobile first party 6
14 10 mobile third party 3
15 25 mobile first party 12
16 25 mobile third party 6
17 50 mobile first party 24
18 50 mobile third party 16
19 75 mobile first party 45
20 75 mobile third party 34
21 90 mobile first party 74
22 90 mobile third party 56
23 100 mobile first party 2174
24 100 mobile third party 2324

Based on June 2022 dataset.

For the query use below references:

Copy link
Collaborator

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mukeshpanchal27 Left a few comments below. Overall this looks good, but I'd like for someone from the HTTP Archive team with more experience in those queries to have a look too.

Can you please provide a reference in the PR description for what the query is based on (https://almanac.httparchive.org/en/2022/javascript#requests, or more specifically https://github.com/HTTPArchive/almanac.httparchive.org/blob/main/sql/2022/javascript/requests_by_3p.sql)?

Regardless of whether the query is entirely correct like this or not, I just ran it (consumes 3 TB, so not too bad) and posted the results on the PR description.

sql/2023/01/third-party-render-blocking-script.sql Outdated Show resolved Hide resolved
sql/2023/01/third-party-render-blocking-script.sql Outdated Show resolved Hide resolved
date = '2022-06-01'
AND type = 'script'
AND JSON_EXTRACT(pages.payload, '$._detected_apps.WordPress') IS NOT NULL
AND CAST(JSON_EXTRACT( pages.payload, '$._renderBlockingJS') AS INT64) > 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see now, here we use pages too, and this part wouldn't be in the technologies table. So maybe you're right and we need to keep using that table. What is the check here for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per Percent of pages using render-blocking JavaScript, We can parse the pages.payload to get render blocking script counts.

sql/2023/01/third-party-render-blocking-script.sql Outdated Show resolved Hide resolved
sql/README.md Outdated Show resolved Hide resolved
# limitations under the License.

# See query results here: https://github.com/GoogleChromeLabs/wpp-research/pull/33
SELECT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main goal here is to study render-blocking third-party scripts.
However, the sub-query i.e (httparchive.almanac.third_parties), brings up 1p and 3p scripts, both render-blocking and non-render blocking.

We are making this study on a site where at least one script is render-blocking, but we can't say through this query if the third-party script is part of the render-blocking script.

cc: @mukeshpanchal27 @felixarntz

# limitations under the License.

# See query results here: https://github.com/GoogleChromeLabs/wpp-research/pull/33
SELECT
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mukeshpanchal27 I am convinced this query will return the distribution of all the third parties and first parties (both render blocking and non-render blocking) for a site with at least one render-blocking script.

This won't return the distribution of render-blocking third-party and render-blocking first-party scripts.
Please find my explanation and example in this comment

I am finding it hard to explain in this PR.
cc: @felixarntz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query to access third-party render-blocking script
3 participants