<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Jaime Vega</title>
    <description>The latest articles on Forem by Jaime Vega (@jvegadev).</description>
    <link>https://forem.com/jvegadev</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F111110%2Fa7db4838-86b2-4bff-b321-c7f20bc89095.jpg</url>
      <title>Forem: Jaime Vega</title>
      <link>https://forem.com/jvegadev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jvegadev"/>
    <language>en</language>
    <item>
      <title>Making the website "fast": optimizing the page critical rendering path.</title>
      <dc:creator>Jaime Vega</dc:creator>
      <pubDate>Thu, 12 Sep 2019 20:08:14 +0000</pubDate>
      <link>https://forem.com/jvegadev/making-the-website-fast-optimizing-the-page-critical-rendering-path-3g88</link>
      <guid>https://forem.com/jvegadev/making-the-website-fast-optimizing-the-page-critical-rendering-path-3g88</guid>
      <description>&lt;p&gt;One of the main objectives I had when I started building &lt;a href="https://www.jvega.dev" rel="noopener noreferrer"&gt;jvega.dev&lt;/a&gt; was to make sure it followed all the best practices in the industry. In a previous post, I explained how I aimed to get top-of-the-class security, and now, during the next few posts, I will explain which techniques or design decisions I have taken to make the website as &lt;em&gt;fast&lt;/em&gt; as possible.&lt;/p&gt;

&lt;p&gt;Before I enter into more details, let me say two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I am sure there is room for improvement. So if you any suggestions or you see any mistakes, please let me know. The code is all public an available in &lt;a href="https://github.com/jhuesos/jvega.dev" rel="noopener noreferrer"&gt;this repository&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Some of the features I am adding to the site could definitely be considered overkill. But I am using the site to learn and practices things I have learned during the last 10 years. And for self-promotion :).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the beginning, I have tried to keep the &lt;a href="https://web.dev/apply-instant-loading-with-prpl/" rel="noopener noreferrer"&gt;PRPL pattern&lt;/a&gt; always in mind and make sure the page remains &lt;a href="https://web.dev/what-is-speed/" rel="noopener noreferrer"&gt;"fast"&lt;/a&gt;. However, defining when a website is "fast" is not as easy as it might seem. Traditionally, the performance was measured using only metrics like page load time or &lt;code&gt;DOMContentLoaded&lt;/code&gt; but these metrics are not effective for two reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They are very unreliable as a page might not be fully loaded when those events are triggered.&lt;/li&gt;
&lt;li&gt;And more importantly, these values might not match with the &lt;em&gt;user experience&lt;/em&gt; of your visitors.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To explain the second point, let's take a look first to this comparison:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0ik7qu9l28dkkhwigcc4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0ik7qu9l28dkkhwigcc4.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;(Measured with &lt;a href="https://www.webpagetest.org/" rel="noopener noreferrer"&gt;WebPageTest.org&lt;/a&gt; using a Motorola G4 device)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;optimized&lt;/em&gt; and &lt;em&gt;not-optimized&lt;/em&gt; version contains exactly the same amount of code and functionality. But as you can see, in the optimized version the content is progressively loaded. In the not-optimized one, even though it loads faster, it shows no progress until is fully loaded, so the &lt;em&gt;perceived performance&lt;/em&gt; might actually be worse, as users might think that website is broken and nothing is happening.&lt;/p&gt;

&lt;p&gt;This is the key idea behind &lt;code&gt;user-centric performance metrics&lt;/code&gt;, make sure the user has &lt;em&gt;the perception that your page loads faster.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;However, measuring performance is always a hard task. But luckily, Google made &lt;a href="https://developers.google.com/web/tools/lighthouse/" rel="noopener noreferrer"&gt;Lighthouse&lt;/a&gt;, a tool that allows measuring the performance of any site, giving you user-centric values with just one click. It even gives you recommendations on how to improve the results. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important!&lt;/strong&gt;. To measure performance using Lighthouse or any other tool, make sure you use your browser in Incognito mode or use a profile &lt;em&gt;with no extensions&lt;/em&gt;, as they can have a significant impact on the results.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My ideal goal is to keep a performance score over 80, as close as possible to 100. Now I am going to explain which process did I follow to optimize the site.&lt;/p&gt;

&lt;p&gt;The idea is to think which content from your site is more important to your user, and try to optimize the loading of that area as much as possible (&lt;em&gt;critical rendering path&lt;/em&gt;) to show it to the user as fast as possible. And defer the rest. To put another example, Youtube loads the video first, and the comments and other sections later.&lt;/p&gt;

&lt;p&gt;So for my site, I made the following decision:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fir193j0hshfo1pet4wg2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fir193j0hshfo1pet4wg2.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To optimize the critical rendering path I did the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Even though the site is made with ReactJS, I made the conscious decision of building the critical section in pure HTML+CSS only. In that way, I could delay loading react and related libraries for later.&lt;/li&gt;
&lt;li&gt;I am also lazy loading the icons within the critical section.&lt;/li&gt;
&lt;li&gt;I am using Babel to compile ES6+ to ES5, but I chose to don't use &lt;em&gt;async functions&lt;/em&gt; in the entry point so the &lt;code&gt;regenerator-runtime&lt;/code&gt; polyfill is not needed. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an extract of the code that bootstraps the page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;core-js&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./Theme.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./main.css&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loadApp&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="cm"&gt;/* webpackPreload: true, webpackChunkName: 'ReactApp' */&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./components/App&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loadCriticalPathResources&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="cm"&gt;/* webpackPreload: true, webpackChunkName: 'email-icon' */&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../static/icons/email.svg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="cm"&gt;/* webpackPreload: true, webpackChunkName: 'home-icon' */&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../static/icons/home.svg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="cm"&gt;/* webpackPreload: true, webpackChunkName: 'linkedin-icon' */&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;../static/icons/linkedin.svg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;]).&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;onSvgIconsLoaded&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;emailIcon&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;homeIcon&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;linkedinIcon&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;emailIcon&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;emailIcon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;homeIcon&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;homeIcon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;linkedinIcon&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;linkedinIcon&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// Continue loading with the rest of the resouces&lt;/span&gt;
    &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;loadApp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Bootstrap&lt;/span&gt;
&lt;span class="c1"&gt;// Delay loading icons as are not critical for the user experience. I aim to reduce the time to first content paint.&lt;/span&gt;
&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;loadCriticalPathResources&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;a href="https://github.com/jhuesos/jvega.dev/blob/loading-performance-comparison-multi-module/src/index.js" rel="noopener noreferrer"&gt;Link to code&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;I mentioned before that one easy way to evaluate that your site is &lt;em&gt;fast&lt;/em&gt; is to use Lighthouse and make sure the score is over 80. But in addition, it is also a good idea to set up a &lt;a href="https://web.dev/performance-budgets-101/" rel="noopener noreferrer"&gt;&lt;em&gt;performance budget&lt;/em&gt;&lt;/a&gt; for your site so, for example, check that the bundle size of your entry point and other assets do not go over a certain threshold. &lt;/p&gt;

&lt;p&gt;A good value to set as maximum entry bundle and assets size is &lt;code&gt;170KB&lt;/code&gt;, and you can easily configure Webpack to break the build if you go over that value by setting the following settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
   &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="na"&gt;performance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;maxAssetSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;170000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;maxEntrypointSize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;170000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;hints&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I hope this gives you a few techniques you can use when building your next site/app. There are many more :). Make sure you check some of the reference sites that I list at the end of this post.&lt;/p&gt;

&lt;p&gt;Ah! The current Lighthouse score for the site is...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fd9j1hbwvza7ry3w62lyb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fd9j1hbwvza7ry3w62lyb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The challenge of optimizing the critical rendering path and CSP
&lt;/h2&gt;

&lt;p&gt;One important optimization I did not apply is to inline in the &lt;code&gt;index.html&lt;/code&gt; the JavaScript and CSS that belongs to the critical path. This is important because reducing to the minimum the number of HTTP requests needed to load the site is very important.&lt;/p&gt;

&lt;p&gt;Unfortunately, the &lt;em&gt;Content Security Policy&lt;/em&gt; with the recommended values do not allow having inline &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;style&amp;gt;&lt;/code&gt; tags in the site. There are options you can use to allow that to happen in a secure way, but that requires the &lt;code&gt;index.html&lt;/code&gt; and the HTTP headers to be dynamic values per request. And as I am hosting the site in &lt;a href="https://www.netlify.com/" rel="noopener noreferrer"&gt;Netlify&lt;/a&gt; and that makes it impossible. And between slightly worse performance and better security, I chose the latter. In a future post I will explain how.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://web.dev/fast" rel="noopener noreferrer"&gt;Web.dev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/fundamentals/performance/prpl-pattern/" rel="noopener noreferrer"&gt;PRPL Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics" rel="noopener noreferrer"&gt;User-centric Performance Metrics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.webpagetest.org/" rel="noopener noreferrer"&gt;WebPageTest.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>performance</category>
      <category>webpack</category>
      <category>lighthouse</category>
      <category>csp</category>
    </item>
    <item>
      <title>I chose the wrong color palette because they were not accessible. This is how I fix that.</title>
      <dc:creator>Jaime Vega</dc:creator>
      <pubDate>Sun, 01 Sep 2019 15:45:43 +0000</pubDate>
      <link>https://forem.com/jvegadev/i-chose-the-wrong-color-palette-because-they-were-not-accessible-this-is-how-i-fix-that-47p9</link>
      <guid>https://forem.com/jvegadev/i-chose-the-wrong-color-palette-because-they-were-not-accessible-this-is-how-i-fix-that-47p9</guid>
      <description>&lt;p&gt;So when I decided to build a new website and resume, I made the decision to use the same design in both. As I wanted to start applying for jobs and the first thing it is always asked is the resume, I decided to do that first.&lt;/p&gt;

&lt;p&gt;I got inspiration from some websites online (as I am not a designer) and I decided to keep it simple: one accent color, two shades of gray and a light color for text. So I chose these ones:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;html&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--accent-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#5addf3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--page-background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#191919&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--content-background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#525659&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--text-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So this is how my resume would look like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3LNY7AnS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rk94y2zzh7vl5xlvswgt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3LNY7AnS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rk94y2zzh7vl5xlvswgt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I know many companies still print resumes for interviews etc., so I decided to create a &lt;em&gt;printer-friendly-version&lt;/em&gt; as well. Trying to be as environment-friendly as possible:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_dG2Ebr6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4jp1lgmist9uses43upl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_dG2Ebr6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/4jp1lgmist9uses43upl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I know what you are thinking: how could you chose those colors, it is pretty obvious that there is no enough contrast!!! And yes, I suspected that but I didn't pay so much attention to it until I started building the website and started checking accessibility... You can do that very easily in your browser dev-tools:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U0kOcyLv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wabdd6k5wda8n9vpe5o0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U0kOcyLv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wabdd6k5wda8n9vpe5o0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Firefox web dev tools&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fVL2wN7Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8m8ufj6kqdbxkynsx7w3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fVL2wN7Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8m8ufj6kqdbxkynsx7w3.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Chrome dev tools&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Yeap, too bad :(. Does Microsoft Word have any tools to check the accessibility of your document? I have no idea but maybe they should.&lt;/p&gt;

&lt;p&gt;So I guess better late than never, so, unfortunately, I would have to make changes in the color palette and change my resume to use the new ones. &lt;/p&gt;

&lt;p&gt;Searching on the Internet I came across this really useful website:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://contrast-grid.eightshapes.com"&gt;Grid Contrast by Eighshapes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And it really really really helped. You set the color and background colors and show you how it looks and the contrast score:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iC5PSuyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/dq88tc86usc92d6eidby.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iC5PSuyz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/dq88tc86usc92d6eidby.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After spending some time choosing the colors I realized that I would have to extend the palette to add one additional color, as a darker blue would not work with a gray background. And I made a compromise not targetting 100% AAA contrast and settling only in AA. One of the ideas I have is to provide multiple themes for the website, so I might introduce later a &lt;em&gt;high-contrast&lt;/em&gt; theme to hit AAA. I settled on this color palette for now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;html&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--accent-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#5addf3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--accent-backgroud-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#0B8296&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--page-background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#191919&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--content-background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#525659&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--text-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#ffffff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hRvTdR_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3svnye83ooe5e33z4lt6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hRvTdR_3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3svnye83ooe5e33z4lt6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://contrast-grid.eightshapes.com/?background-colors=%23FFFFFF%2C%20Text%20color%0D%0A%235ADDF3%2C%20Accent%20color%0D%0A%230B8296%2C%20Acccent%20background%20color%0D%0A%23525659%2C%20content%20background%20color%0D%0A%23191919%2C%20page%20background%20color%0D%0A&amp;amp;foreground-colors=%23FFFFFF%2C%20White%0D%0A%235addf3%2C%20light%20blue%0D%0A%23525659%0D%0A%23191919%0D%0A%230B8296&amp;amp;es-color-form__tile-size=regular"&gt;New colors&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Nn_mRbSy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/m9avsa3bjl38hzmukmhe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nn_mRbSy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/m9avsa3bjl38hzmukmhe.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course, this is just the beginning. My goal is to make sure the final website keeps the same score.&lt;/p&gt;

</description>
      <category>colorcontrast</category>
      <category>a11y</category>
      <category>mistakes</category>
    </item>
    <item>
      <title>Making the website secure by adding additional HTTP headers in Netlify (and Zeit Now)</title>
      <dc:creator>Jaime Vega</dc:creator>
      <pubDate>Mon, 12 Aug 2019 10:57:39 +0000</pubDate>
      <link>https://forem.com/jvegadev/making-the-website-secure-by-adding-additional-http-headers-in-netlify-and-zeit-now-3mae</link>
      <guid>https://forem.com/jvegadev/making-the-website-secure-by-adding-additional-http-headers-in-netlify-and-zeit-now-3mae</guid>
      <description>&lt;p&gt;When I started thinking about building my new website, I wanted to make sure that even though its content is not sensible or private, I wanted to make sure it follows the best-in-class security practices.&lt;/p&gt;

&lt;p&gt;In this first iteration, I didn't want to bother also managing the back-end infrastructure, so I decided to host the website in a third-party hosting provider. There are excellent options out there, but I decided to stick with &lt;a href="https://www.netlify.com/" rel="noopener noreferrer"&gt;Netlify&lt;/a&gt; for the time being, I am not using any custom feature so it would be straightforward to migrate between services.&lt;/p&gt;

&lt;p&gt;My goal is to get the top score in the &lt;a href="https://securityheaders.com/" rel="noopener noreferrer"&gt;Security Headers&lt;/a&gt;. If you have never used this website, it is brilliant; it gives you a score and recommendations on how to improve it.&lt;/p&gt;

&lt;p&gt;This is the score you get with the default configuration in Netlify:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F85svu7q28or0276xft6n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F85svu7q28or0276xft6n.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not great, isn't it? But the site informs you about what is missing and give you links to understand more:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5kfx8ut2jb4sj52r6ema.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F5kfx8ut2jb4sj52r6ema.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cool thing about Netlify is that allows you to set your custom HTTP headers effortlessly. You need to add a file named &lt;code&gt;_headers&lt;/code&gt; with the headers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Make sure the file ends up in your built folder if you use Webpack or any build tool.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is the content of the &lt;code&gt;_headers&lt;/code&gt; file for an &lt;strong&gt;A+&lt;/strong&gt; score:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/*
  Content-Security-Policy: default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self';
  Feature-Policy: accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'self'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none';  picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none';
  X-Frame-Options: DENY
  X-XSS-Protection: 1; mode=block
  Referrer-Policy: no-referrer
  X-Content-Type-Options: nosniff

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And this is how I got an &lt;strong&gt;A+&lt;/strong&gt; score:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fynrhdrxvztqyrg1qcf0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fynrhdrxvztqyrg1qcf0g.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I will explain how did I come up with these values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;X-Content-Type-Options: nosniff&lt;/code&gt; should always be set with that value.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;X-XSS-Protection: 1; mode=block&lt;/code&gt; this one is to provide XSS protection in older browsers that do not support the &lt;em&gt;Content Security Policy (CSP)&lt;/em&gt; standard.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;X-Frame-Options: DENY&lt;/code&gt; this one is also added to protect browsers that do not support the CSP standard. The value should always be set to &lt;code&gt;DENY&lt;/code&gt; unless you are planning to show your site in an iframe on another website. This is very important to protect against &lt;code&gt;Clickjack attacks&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;CSP&lt;/code&gt; value requires more explanation. I am not going to explain the whole CSP standard; I will focus on how do I approach setting the value.&lt;/p&gt;

&lt;p&gt;I always start with denying any resource loading by default with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Content-Security-Policy: default-src 'none';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then I start adding only the necessary exceptions for the site to work. This approach is the most secure way as you don't need to fully know all the current directives available (CSP is a living standard; new directives are added regularly).&lt;/p&gt;

&lt;p&gt;In the first iterations of this website, I only needed to be able to load scripts and images, so I add an exception for both to allow loading them &lt;em&gt;only&lt;/em&gt; from the same domain. This means all content comes from my server and should be secure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Content-Security-Policy: default-src 'none'; script-src 'self'; img-src 'self';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As the development of the website evolves, I will continue to add more directives. For example, at some point, I will have to allow loading styles, so I will have to change the policy to be like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Content-Security-Policy: default-src 'none'; script-src 'self'; img-src 'self'; style-src 'self';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; There is an issue with prefetch requests. As part of CSP v3, a new directive will be introduced to define their behavior &lt;code&gt;prefetch-src&lt;/code&gt; but it is not available in any browser, yet. But if you set &lt;code&gt;default-src&lt;/code&gt; to &lt;code&gt;none&lt;/code&gt;, prefetch queries are all blocked by default. Why? :(. So that gives me two options only: or don't use prefetch at all, or set the default to &lt;code&gt;self&lt;/code&gt;... And I guess is not that bad as setting default to &lt;code&gt;self&lt;/code&gt; is okay, but what if I have to make a prefetch to another domain, do I need to whitelist all requests to that domain? &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For the &lt;code&gt;Feature-Policy&lt;/code&gt; I followed the same approach: I disallow all the features by default, and I will start enabling them as I need them. Unfortunately, the current standard does not support denying all by default hence the length of the value.&lt;/p&gt;

&lt;p&gt;And last but not least, I disabled the referred information &lt;code&gt;Referrer-Policy&lt;/code&gt; as I do not need it for now. I might enable it later if I need it for Analytics purposes. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus: How to add custom headers to Zeit Now.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://zeit.co/now" rel="noopener noreferrer"&gt;Zeit Now&lt;/a&gt; also supports adding custom HTTP headers. This is the content of the &lt;code&gt;now.json&lt;/code&gt; file to achieve the same as in Netlify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"jvegadev"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"routes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/.*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Content-Security-Policy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self';"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"X-Frame-Options"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"DENY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"X-XSS-Protection"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1; mode=block"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"X-Content-Type-Options"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nosniff"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Referrer-Policy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"no-referrer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"Feature-Policy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"accelerometer 'none'; ambient-light-sensor 'none'; autoplay 'none'; camera 'none'; encrypted-media 'none'; fullscreen 'self'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; microphone 'none'; midi 'none'; payment 'none';  picture-in-picture 'none'; speaker 'none'; sync-xhr 'none'; usb 'none'; vr 'none';"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Interesting links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.troyhunt.com/clickjack-attack-hidden-threat-right-in/" rel="noopener noreferrer"&gt;Clickjack attack – the hidden threat right in front of you&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://scotthelme.co.uk/hardening-your-http-response-headers/#x-frame-options" rel="noopener noreferrer"&gt;Hardening your HTTP response headers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP" rel="noopener noreferrer"&gt;MDN CSP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>netflify</category>
      <category>now</category>
      <category>csp</category>
    </item>
  </channel>
</rss>
