Skip to content

Commit

Permalink
Merge branch 'main' of github.com:HTTPArchive/almanac.httparchive.org…
Browse files Browse the repository at this point in the history
… into production
  • Loading branch information
tunetheweb committed Jan 30, 2021
2 parents 9cb6ffb + ab1dd7a commit d3d26eb
Show file tree
Hide file tree
Showing 24 changed files with 134 additions and 114 deletions.
32 changes: 16 additions & 16 deletions src/config/last_updated.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,52 +47,52 @@
"/static/pdfs/web_almanac_2019_en.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "1614580f6cdd50766f7dcf424eb52a45",
"hash": "8f214b4c56e22bc20cfaff3c7ec78832",
"size": 17
},
"/static/pdfs/web_almanac_2019_en_cover_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "ce9d2a687c200a4fb1e6386b9f39855e"
"hash": "7055b0015d9f4463a6a0cfe4194bded7"
},
"/static/pdfs/web_almanac_2019_en_print_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "c6eafecd630f43f7c6a546e66848cd60",
"hash": "ce876d47987c5942ff2b8e573de42f16",
"size": 17
},
"/static/pdfs/web_almanac_2019_ja.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "70c4b2e8d93dbe23fa23dfea3e2da706",
"hash": "12b65e20a869a5646871a2fde1bcad0c",
"size": 17
},
"/static/pdfs/web_almanac_2019_ja_cover_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "b976207598fe9da4da02b49aa0b412e2"
"hash": "330393c6433ac6065033894380bdf05e"
},
"/static/pdfs/web_almanac_2019_ja_print_A5.pdf": {
"date_published": "2020-05-15T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "5f16a60409303409691fabf5d6bee4fe",
"hash": "369f02ee2dd1caf2ef6501dfd39eb55e",
"size": 17
},
"/static/pdfs/web_almanac_2020_en.pdf": {
"date_published": "2020-12-08T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "87ec2126c88e636a44214537c747751e",
"hash": "331beebca904e22d4ac0adea776b8859",
"size": 25
},
"/static/pdfs/web_almanac_2020_en_cover_A5.pdf": {
"date_published": "2020-12-09T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "edcdc13367cc191c40b20bb72d780d9d"
"hash": "503258505b823c9a2e22543c0236a853"
},
"/static/pdfs/web_almanac_2020_en_print_A5.pdf": {
"date_published": "2020-12-09T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "5902dd27db3d217782de56e0c21b192a",
"hash": "18429a3f58d64d5a5ec114e4a6ebb1ae",
"size": 25
},
"en/2019/chapters/accessibility.html": {
Expand All @@ -103,12 +103,12 @@
"en/2019/chapters/caching.html": {
"date_published": "2019-11-11T00:00:00.000Z",
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "c848917e48ec629d0c87694edfc8e8ba"
"hash": "ace1bade010551bb656908036ec920ec"
},
"en/2019/chapters/cdn.html": {
"date_published": "2019-11-11T00:00:00.000Z",
"date_modified": "2021-01-27T00:00:00.000Z",
"hash": "301466dc20c8756ee4f17cbdcc0d720a"
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "f04b6d15f3910aefc580979d3c04ed88"
},
"en/2019/chapters/cms.html": {
"date_published": "2019-11-11T00:00:00.000Z",
Expand Down Expand Up @@ -212,8 +212,8 @@
},
"en/2019/methodology.html": {
"date_published": "2019-11-04T00:00:00.000Z",
"date_modified": "2020-12-09T00:00:00.000Z",
"hash": "4aed7ffd6ee2bdb042755619dc5b52e2"
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "b680a7ee8de6e076996676c4285df6fd"
},
"en/2019/table_of_contents.html": {
"date_published": "2019-11-04T00:00:00.000Z",
Expand Down Expand Up @@ -347,8 +347,8 @@
},
"en/2020/methodology.html": {
"date_published": "2020-10-24T00:00:00.000Z",
"date_modified": "2020-12-09T00:00:00.000Z",
"hash": "0d075b11016a4ba19446f707bd551a53"
"date_modified": "2021-01-30T00:00:00.000Z",
"hash": "1da04b716683112fce16b458b5646c97"
},
"en/2020/stories/content_distribution.html": {
"date_published": "2021-01-18T00:00:00.000Z",
Expand Down
2 changes: 1 addition & 1 deletion src/content/en/2019/caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ translators: []
discuss: 1771
results: https://docs.google.com/spreadsheets/d/1mnq03DqrRBwxfDV05uEFETK0_hPbYOynWxZkV3tFgNk/
paulcalvano_bio: Paul Calvano is a Web Performance Architect at <a href="https://www.akamai.com/">Akamai</a>, where he helps businesses improve the performance of their websites. He's also a co-maintainer of the HTTP Archive project. You can find him tweeting at <a href="https://twitter.com/paulcalvano">@paulcalvano</a>, blogging at <a href="https://paulcalvano.com">http://paulcalvano.com</a> and sharing HTTP Archive research at <a href="https://discuss.httparchive.org">https://discuss.httparchive.org</a>.
featured_quote: Caching is a technique that enables the reuse of previously downloaded content. It provides a significant performance benefit by avoiding costly network requests and it also helps scale an application by reducing the traffic to a website's origin infrastructure. There's an old saying, &quot;the fastest request is the one that you don't have to make,&quot; and caching is one of the key ways to avoid having to make requests.
featured_quote: Caching is a technique that enables the reuse of previously downloaded content. It provides a significant performance benefit by avoiding costly network requests and it also helps scale an application by reducing the traffic to a website's origin infrastructure. There's an old saying, "the fastest request is the one that you don't have to make" and caching is one of the key ways to avoid having to make requests.
featured_stat_1: 27%
featured_stat_label_1: Responses not using any caching headers
featured_stat_2: 39%
Expand Down
2 changes: 1 addition & 1 deletion src/content/en/2019/cdn.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ discuss: 1772
results: https://docs.google.com/spreadsheets/d/1Y7kAxjxUl8puuTToe6rL3kqJLX1ftOb0nCcD8m3lZBw/
andydavies_bio: Andy Davies is a Freelance Web Performance Consultant and has helped some of the UK's leading retailers, newspapers and financial services companies to make their sites faster. He wrote The Pocket Guide to Web Performance, is co-author of Using WebPageTest and also an organizer of the London Web Performance meetup. You can find Andy on Twitter as <a href="https://twitter.com/andydavies">@AndyDavies</a>, and he occasionally blogs at <a href="https://andydavies.me">https://andydavies.me</a>
colinbendell_bio: Colin is part of the CTO Office at <a href="https://cloudinary.com/">Cloudinary</a> and co-author of the O'Reilly book <a href="https://www.oreilly.com/library/view/high-performance-images/9781491925799/">High Performance Images</a>. He spends much of his time at the intersection of high volume data, media, browsers and standards. You can find him on tweeting <a href="https://twitter.com/colinbendell">@colinbendell</a> and at blogging at <a href="https://bendell.ca/">https://bendell.ca</a>.
featured_quote: &quot;Use a Content Delivery Network&quot; was one of Steve Souders original recommendations for making web sites load faster. It's advice that remains valid today, and in this chapter of the Web Almanac we're going to explore how widely Steve's recommendation has been adopted, how sites are using Content Delivery Networks (CDNs), and some of the features they're using.
featured_quote: "Use a Content Delivery Network" was one of Steve Souders original recommendations for making web sites load faster. It's advice that remains valid today, and in this chapter of the Web Almanac we're going to explore how widely Steve's recommendation has been adopted, how sites are using Content Delivery Networks (CDNs), and some of the features they're using.
featured_stat_1: 20%
featured_stat_label_1: Home pages served by CDN
featured_stat_2: 9.61%
Expand Down
20 changes: 11 additions & 9 deletions src/templates/base/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@
{% endblock %}
{% endblock %}

{% macro figure_dropdown(metadata, id, sheets_gid="", sql_file="", image="", caption="") %}
{% macro figure_dropdown(metadata, chapter_config, id, sheets_gid="", sql_file="", image="", caption="") %}
{% if sheets_gid != "" or sql_file != "" or image != "" %}
<div class="figure-dropdown nav-dropdown">
<button class="nav-dropdown-btn js-enable hidden" disabled aria-expanded="false" title="{{ self.explore_the_results() }}">
Expand Down Expand Up @@ -770,10 +770,11 @@
{% endmacro %}
{% endif %}

{% macro figure_id(metadata, id) %}{{ metadata.chapter_number }}.{{ id }}{% endmacro %}
{% macro figure_id(metadata, chapter_config, id) %}{{ chapter_config.chapter_number }}.{{ id }}{% endmacro %}

{% macro figure_link(
metadata,
chapter_config,
id,
caption,
sheets_gid="",
Expand All @@ -783,9 +784,9 @@
)
%}
{% if ebook %}
<a href="#fig-{{ metadata.chapter_number }}-{{ id }}" class="anchor-link">{{ figure_text(metadata, id) }}</a> {{ caption|safe }}
<a href="#fig-{{ chapter_config.chapter_number }}-{{ id }}" class="anchor-link">{{ figure_text(metadata, chapter_config, id) }}</a> {{ caption|safe }}
{% else %}
<a href="#fig-{{ id }}" class="anchor-link">{{ figure_text(metadata, id) }}</a> {{ caption|safe }}
<a href="#fig-{{ id }}" class="anchor-link">{{ figure_text(metadata, chapter_config, id) }}</a> {{ caption|safe }}
{% endif %}
{% endmacro %}

Expand All @@ -810,7 +811,8 @@
content="",
classes="",
metadata="",
ebook=false
ebook=false,
chapter_config=""
)
%}

Expand Down Expand Up @@ -845,17 +847,17 @@
<img src="{{ image }}" class="{{ classes }}" alt="{{ caption|striptags }}" aria-labelledby="{{ anchor }}-caption" aria-describedby="{{ anchor }}-description" width="{{ width }}" height="{{ height }}" loading="lazy" />
{%- endif %}
</a>
{% if not ebook %}{{ figure_dropdown(metadata, id, sheets_gid, sql_file, image) }}{% endif %}
{% if not ebook %}{{ figure_dropdown(metadata, chapter_config, id, sheets_gid, sql_file, image) }}{% endif %}
</div>
<button hidden="" class="fig-description-button" aria-expanded="false" aria-controls="{{ anchor }}-description" data-show-text="{{ show_description(metadata,id) }}" data-hide-text="{{ hide_description(metadata,id) }}">{{ show_description(metadata,id) }}</button>
<button hidden="" class="fig-description-button" aria-expanded="false" aria-controls="{{ anchor }}-description" data-show-text="{{ show_description(metadata,chapter_config,id) }}" data-hide-text="{{ hide_description(metadata,id) }}">{{ show_description(metadata,chapter_config,id) }}</button>
<div id="{{ anchor }}-description" class="visually-hidden">{{ description|safe }}</div>
{%- elif content != "" %}
<div class="figure-wrapper">
<div class="{{ classes }}">{{ content|safe }}</div>
{% if not ebook %}{{ figure_dropdown(metadata, id, sheets_gid, sql_file, image, ebook) }}{% endif %}
{% if not ebook %}{{ figure_dropdown(metadata, chapter_config, id, sheets_gid, sql_file, image, ebook) }}{% endif %}
</div>
{%- endif %}
<figcaption id="{{ anchor }}-caption">{{ figure_link(metadata, id, caption, ebook=ebook, sheets_gid=sheets_gid, sql_file=sql_file, image=image) }}</figcaption>
<figcaption id="{{ anchor }}-caption">{{ figure_link(metadata, chapter_config, id, caption, ebook=ebook, sheets_gid=sheets_gid, sql_file=sql_file, image=image) }}</figcaption>
</figure>
{%- endmacro %}

Expand Down
3 changes: 2 additions & 1 deletion src/templates/base/ebook.ejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@

{% set metadata = <%- JSON.stringify(chapter.metadata) %> %}
{% set chapter_hero_dir = "/static/images/%s/%s/" % ("<%- chapter.hero_dir || '2019' %>", metadata.chapter) %}
{% set chapter_config = <%- JSON.stringify(chapter) %> %}
<section class="chapter" id="chapter-<%- chapter.chapter_number %>">
<div class="body" id="{{ metadata.get('chapter') }}">

<div class="subtitle">
{{ self.part() }} <%- chapter.part %> {{ self.chapter() }} <%- chapter.chapter_number %>
{{ self.part() }} {{ chapter_config.part }} {{ self.chapter() }} {{ chapter_config.chapter_number }}
</div>
<h1 class="title title-lg">
{{ metadata.get('title') }}
Expand Down
8 changes: 4 additions & 4 deletions src/templates/en/2019/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
{% block methodology_stat_1 %}5.8M{% endblock %}
{% block methodology_stat_2 %}20.9 TB{% endblock %}
{% block methodology_description %}
Unless otherwise noted, the metrics in all of the 20 chapters of the Web Almanac are sourced from the HTTP Archive dataset. HTTP Archive is a community-run project that has been tracking how the web is built since 2010. Using WebPageTest and Lighthouse under the hood, metadata about nearly 6 million websites are tested monthly and included in a public BigQuery database for analysis. The July 2019 dataset was used as the basis for the Web Almanac's metrics. For more information, see the Methodology page.
Unless otherwise noted, the metrics in all of the 20 chapters of the Web Almanac are sourced from the HTTP Archive dataset. HTTP Archive is a community-run project that has been tracking how the web is built since 2010. Using WebPageTest and Lighthouse under the hood, metadata about nearly 6 million websites are tested monthly and included in a public BigQuery database for analysis. The July 2019 dataset was used as the basis for the Web Almanac&#8217;s metrics. For more information, see the Methodology page.
{% endblock %}

{% block foreword %}
<p>
The open web is an amazingly complex, evolving network of technologies. Entire industries and careers are built on the web and depend on its vibrant ecosystem to succeed. As critical as the web is, understanding how it's doing has been surprisingly elusive. Since 2010, the mission of the HTTP Archive project has been to track how the web is built, and it's been doing an amazing job of it. However, there has been one gap that has been especially challenging to close: bringing meaning to the data that the HTTP Archive project has been collecting and enabling the community to easily understand how the web is performing. That's where the Web Almanac comes in.
The open web is an amazingly complex, evolving network of technologies. Entire industries and careers are built on the web and depend on its vibrant ecosystem to succeed. As critical as the web is, understanding how it&#8217;s doing has been surprisingly elusive. Since 2010, the mission of the HTTP Archive project has been to track how the web is built, and it&#8217;s been doing an amazing job of it. However, there has been one gap that has been especially challenging to close: bringing meaning to the data that the HTTP Archive project has been collecting and enabling the community to easily understand how the web is performing. That&#8217;s where the Web Almanac comes in.
</p>

<p>
The mission of the Web Almanac is to take the treasure trove of insights that would otherwise be accessible only to intrepid data miners, and package it up in a way that's easy to understand. This is made possible with the help of industry experts who can make sense of the data and tell us what it means. Each of the 20 chapters in the Web Almanac focuses on a specific aspect of the web, and each one has been authored and peer reviewed by experts in their field. The strength of the Web Almanac flows directly from the expertise of the people who write it.
The mission of the Web Almanac is to take the treasure trove of insights that would otherwise be accessible only to intrepid data miners, and package it up in a way that&#8217;s easy to understand. This is made possible with the help of industry experts who can make sense of the data and tell us what it means. Each of the 20 chapters in the Web Almanac focuses on a specific aspect of the web, and each one has been authored and peer reviewed by experts in their field. The strength of the Web Almanac flows directly from the expertise of the people who write it.
</p>

<p>
Many of the findings in the Web Almanac are worthy of celebration, but it's also an important reminder of the work still required to deliver high-quality user experiences. The data-driven analyses in each chapter are a form of accountability we all share for developing a better web. It's not about shaming those that are getting it wrong, but about shining a guiding light on the path of best practices so there is a clear, right way to do things. With the continued help of the web community, we hope to make this an annual tradition, so each year we can track our progress and make course corrections as needed.
Many of the findings in the Web Almanac are worthy of celebration, but it&#8217;s also an important reminder of the work still required to deliver high-quality user experiences. The data-driven analyses in each chapter are a form of accountability we all share for developing a better web. It&#8217;s not about shaming those that are getting it wrong, but about shining a guiding light on the path of best practices so there is a clear, right way to do things. With the continued help of the web community, we hope to make this an annual tradition, so each year we can track our progress and make course corrections as needed.
</p>

<p>
Expand Down
Loading

0 comments on commit d3d26eb

Please sign in to comment.