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

WIP: 2020 Third Parties Chapter #1668

Merged
merged 7 commits into from
Dec 9, 2020

Conversation

simonhearne
Copy link
Contributor

@simonhearne simonhearne commented Dec 8, 2020

Progress on #901

@simonhearne simonhearne added the writing Related to wording and content label Dec 8, 2020
@simonhearne simonhearne added this to the 2020 Content Writing milestone Dec 8, 2020
@simonhearne simonhearne self-assigned this Dec 8, 2020

<p id="gdcalert10" ><span style="color: red; font-weight: bold">>>>>> gd2md-html alert: inline image link here (to images/image10.png). Store image on your image server and adjust path/filename/extension if necessary. </span><br>(<a href="#">Back to top</a>)(<a href="#gdcalert11">Next alert</a>)<br><span style="color: red; font-weight: bold">>>>>> </span></p>

![alt_text](images/image10.png "image_tooltip")
Copy link
Member

@tunetheweb tunetheweb Dec 8, 2020

Choose a reason for hiding this comment

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

@simonhearne If you change these WIP items to Jinja2 comments then it won't fail the pipeline and so will give you real feedback on any real issues:

Suggested change
![alt_text](images/image10.png "image_tooltip")
{# ![alt_text](images/image10.png "image_tooltip") #}

@simonhearne
Copy link
Contributor Author

simonhearne commented Dec 8, 2020 via email

@rviscomi rviscomi added the ASAP This issue is blocking progress label Dec 8, 2020
Comment on lines 8 to 9
reviewers: [tammyeverts, jzyang]
analysts: [max-ostapenko]
Copy link
Member

Choose a reason for hiding this comment

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

Also update contributor metadata when you get a chance. List everyone who contributed, remove those that didn't, and order roughly by significance of their contributions (as a courtesy to those that did more)

Copy link
Contributor

@paulcalvano paulcalvano left a comment

Choose a reason for hiding this comment

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

Nice work @simonhearne. This is excellent. I added a few comments/suggestions in this review.

### Caveats

* All data presented here is based on a non-interactive, cold load. These values could start to look quite different after user interaction.
* The pages are tested with no cookies set, so third-parties requested after opt-in are not included. This will especially affect pages hosted and predominantly served to countries in scope for the [General Data Protection Regulation](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation).
Copy link
Contributor

Choose a reason for hiding this comment

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

In the context of GDPR, it may also be important to mention that all of these measurements were performed on servers in the US.

Also worth including a link to the methodolgy - https://almanac.httparchive.org/en/2020/methodology


The sixth most common domain is digicert.com. Calls to digicert.com are generally OCSP revocation checks due to TLS certificates not having OCSP stapling enabled, or the use of Extended Validation (EV) certificates which prevent pinning of intermediate certificates. This number is exaggerated in HTTP Archive due to all page loads being effectively first-time visitors - OCSP responses are generally valid for seven days in real-world browsing. See [this blog post](https://simonhearne.com/2020/drop-ev-certs/) to read more on this issue.

Further down the list at 2.43% is ajax.googleapis.com, Google's [Hosted Libraries project](https://developers.google.com/speed/libraries). Whilst loading a library such as jQuery from a hosted service is easy, the additional cost of a connection to a third-party domain may have a negative impact on performance. It is best to host all critical JavaScript and CSS on the root domain, if possible. There is also now no cache benefit to using a shared CDN resource, as all major browsers [partition caches by page](https://developers.google.com/web/updates/2020/10/http-cache-partitioning).
Copy link
Contributor

Choose a reason for hiding this comment

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

Harry Roberts wrote an excellent blog post about self hosting static assets last year, which may be worth linking to here. https://csswizardry.com/2019/05/self-host-your-static-assets/

)
}}

The results show that the majority of 3XX responses are small: the 90th percentile is 420B, i.e. 90% of 3XX responses are 420 bytes or smaller. The 95th percentile is 6.5kB, the 99th is 36kB and the 99.9th is over 100kB! Whilst redirects may seem innocuous, 100kB is a reasonable amount of bytes over the wire for a response that simply leads to another response.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The results show that the majority of 3XX responses are small: the 90th percentile is 420B, i.e. 90% of 3XX responses are 420 bytes or smaller. The 95th percentile is 6.5kB, the 99th is 36kB and the 99.9th is over 100kB! Whilst redirects may seem innocuous, 100kB is a reasonable amount of bytes over the wire for a response that simply leads to another response.
The results show that the majority of 3XX responses are small: the 90th percentile is 420B, i.e. 90% of 3XX responses are 420 bytes or smaller. The 95th percentile is 6.5kB, the 99th is 36kB and the 99.9th is over 100kB! Whilst redirects may seem innocuous, 100kB is an unreasonable amount of bytes over the wire for a response that simply leads to another response.


## Repercussions

We know that adding arbitrary JavaScript to our sites introduces risks to both site speed and security. Site owners must be diligent to balance the value of the third-party scripts they include with the speed penalty they may bring, and use modern features such as [subresource integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) and [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) to maintain a strong security posture.
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be worth referencing the security chapter here, since that should cover both SRI and CSP adoption.

@rviscomi
Copy link
Member

rviscomi commented Dec 9, 2020

Merging and iterating

Paul's feedback can be resolved in a follow-up PR

@rviscomi rviscomi merged commit fc1ba62 into HTTPArchive:main Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP This issue is blocking progress writing Related to wording and content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants