<?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: Beto Muniz</title>
    <description>The latest articles on Forem by Beto Muniz (@obetomuniz).</description>
    <link>https://forem.com/obetomuniz</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%2F254213%2Fdcead528-3d24-4877-900b-49ef33d82a2b.png</url>
      <title>Forem: Beto Muniz</title>
      <link>https://forem.com/obetomuniz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/obetomuniz"/>
    <language>en</language>
    <item>
      <title>How to improve the Critical Path CSS on web using the “Above-The-Fold" strategy?</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 31 May 2021 15:28:04 +0000</pubDate>
      <link>https://forem.com/obetomuniz/how-to-improve-the-critical-path-css-on-web-using-the-above-the-fold-strategy-3nkd</link>
      <guid>https://forem.com/obetomuniz/how-to-improve-the-critical-path-css-on-web-using-the-above-the-fold-strategy-3nkd</guid>
      <description>&lt;p&gt;In this brief content, I am sharing about the &lt;strong&gt;Above-The-Fold&lt;/strong&gt; strategy to load CSS and why it matters to improve the page loading of our web pages. &lt;/p&gt;




&lt;p&gt;📁 &lt;strong&gt;Above-The-Fold&lt;/strong&gt; strategy on the web is a practice that extracts critical CSS declaration to render the layout displayed during the initial page load.&lt;/p&gt;

&lt;p&gt;⏬ Non-critical CSS is added to another context (usually a dedicated &lt;code&gt;.css&lt;/code&gt; file) to use async loading.&lt;/p&gt;




&lt;p&gt;⌛️ &lt;strong&gt;Above-The-Fold&lt;/strong&gt; enhances the loading experience while browsing since the browser will have the necessary CSS to scaffold the layout.&lt;/p&gt;

&lt;p&gt;⏱ Also, this technique is an essential strategy to improve &lt;a href="https://web.dev/first-contentful-paint"&gt;First Content Paint&lt;/a&gt; metrics in our web pages.&lt;/p&gt;




&lt;p&gt;👉 Have you already heard about this web optimization opportunity strategy? &lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>webperf</category>
    </item>
    <item>
      <title>How to avoid Meltdown, Spectre and CSRF Attacks on Web with CORP, CORB, and CORS?</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 24 May 2021 21:33:26 +0000</pubDate>
      <link>https://forem.com/obetomuniz/how-to-avoid-meltdown-spectre-and-csrf-attacks-on-web-with-corp-corb-and-cors-1944</link>
      <guid>https://forem.com/obetomuniz/how-to-avoid-meltdown-spectre-and-csrf-attacks-on-web-with-corp-corb-and-cors-1944</guid>
      <description>&lt;p&gt;A brief and useful content about the mechanics on Cross-Origin Read Blocking, Cross-Origin Resource Policy and Cross-Origin Resource Sharing against &lt;a href="https://meltdownattack.com/"&gt;Meltdown, Spectre&lt;/a&gt; and &lt;a href="https://owasp.org/www-community/attacks/csrf"&gt;CSRF&lt;/a&gt; Attacks.&lt;/p&gt;




&lt;h2&gt;
  
  
  CORB
&lt;/h2&gt;

&lt;p&gt;By design, &lt;strong&gt;Cross-Origin Read Blocking&lt;/strong&gt; validates browser requests before they even reach the server using their &lt;strong&gt;MIME type&lt;/strong&gt; as a validation rule.&lt;/p&gt;

&lt;p&gt;To enable it, send the HTTP header &lt;code&gt;X-Content-Type-Options: nosniff&lt;/code&gt;  from the server.&lt;/p&gt;




&lt;h2&gt;
  
  
  CORP
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cross-Origin Resource Policy&lt;/strong&gt; is a complementary &lt;em&gt;CORB&lt;/em&gt; mechanism for validation applied to requests flagged with &lt;code&gt;no-cors&lt;/code&gt; to invalidate them if they came from different domains or origin.&lt;/p&gt;

&lt;p&gt;Send the header &lt;code&gt;Cross-Origin-Resource-Policy&lt;/code&gt; from the server with values &lt;code&gt;same-origin&lt;/code&gt; or &lt;code&gt;same-site&lt;/code&gt; to invalidate &lt;code&gt;no-cors&lt;/code&gt; requests from different domains or origin.&lt;/p&gt;




&lt;h2&gt;
  
  
  CORS
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Cross-Origin Resource Sharing&lt;/strong&gt; is a logical context mechanism that ensures minimal security in the way that users consume web content using browsers instructing how the browser will validate the origin of the requests.&lt;/p&gt;

&lt;p&gt;To define rules about how the origin of the request will be identified, send the HTTP header &lt;code&gt;Access-Control-Allow-Origin&lt;/code&gt; using values like &lt;code&gt;&amp;lt;exact_request_origin&amp;gt;&lt;/code&gt; and even a more generic approaches using &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Hope that now you understand a bit better why to use these &lt;strong&gt;Cross-Origin Resource&lt;/strong&gt; features&lt;/p&gt;

&lt;p&gt;Try don't disable or ignore them in your web applications. &lt;strong&gt;Spectre, CSRF, and Meltdown attacks are really dangerous&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>How to Protect Cookies Against Common XSS Attacks on the Web?</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 17 May 2021 21:58:30 +0000</pubDate>
      <link>https://forem.com/obetomuniz/how-to-protect-cookies-against-common-xss-attacks-on-the-web-3p39</link>
      <guid>https://forem.com/obetomuniz/how-to-protect-cookies-against-common-xss-attacks-on-the-web-3p39</guid>
      <description>&lt;p&gt;We can ignore Cookies danger by just not recommending its usage, but the fact is that &lt;a href="https://w3techs.com/technologies/details/ta-googleanalytics#:~:text=google%20analytics%20is%20used%20by%2084.8%25%20of%20all%20the%20websites%20whose%20traffic%20analysis%20tool%20we%20know.%20this%20is%2055.2%25%20of%20all%20websites."&gt;at least 55% of all the websites&lt;/a&gt; use Cookies RIGHT NOW even with lots of existing cookieless strategies.&lt;/p&gt;

&lt;p&gt;So how to protect Cookies against Common XSS Attacks?&lt;/p&gt;

&lt;p&gt;Well, if your app really needs to use Cookies, configure each one  through &lt;a href="https://developer.mozilla.org/pt-BR/docs/Web/HTTP/Headers/Set-Cookie"&gt;Set-Cookie HTTP Header&lt;/a&gt; with at least the following flags:&lt;/p&gt;

&lt;p&gt;🍪 &lt;code&gt;Secure&lt;/code&gt;: To allow the Cookie only through HTTPS&lt;/p&gt;

&lt;p&gt;🍪 &lt;code&gt;HttpOnly&lt;/code&gt;: To remove the Cookie from the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie"&gt;document.cookie&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🍪 &lt;code&gt;SameSite&lt;/code&gt;: To limit the Cookie context usage&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Set-Cookie: Secure&lt;span class="p"&gt;;&lt;/span&gt;HttpOnly&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nv"&gt;SameSite&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Strict&lt;span class="p"&gt;;&lt;/span&gt;...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hope that with these tips, your app now has a few more chances against XSS Attackers that use Cookies breaches. Anyway, keep in mind that complex attacks can easily bypass these tips. So try to migrate ASAP to cookieless strategies.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cybersecurity</category>
      <category>security</category>
    </item>
    <item>
      <title>XSS Attacks Types on Web</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 10 May 2021 21:03:19 +0000</pubDate>
      <link>https://forem.com/obetomuniz/xss-attacks-types-on-web-36mh</link>
      <guid>https://forem.com/obetomuniz/xss-attacks-types-on-web-36mh</guid>
      <description>&lt;p&gt;Know how each Cross-Site Scripting Attack behaves is crucial to start to think about how vulnerabilities in our web apps allow malicious codes to be executed using the browser to take sensible data from users.&lt;/p&gt;

&lt;p&gt;That's what this article is about. &lt;/p&gt;




&lt;p&gt;🔓 &lt;strong&gt;Reflected XSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📌 This attack XSS use URL parameters or data submitted via POST in forms to inject malicious code on that server request that persists some data for later execution in the browser. Third-party Browser extensions could even be an access point to inject such a malicious code.&lt;/p&gt;




&lt;p&gt;🔓 &lt;strong&gt;Stored XSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📌 This attack XSS happens when malicious code is persisted by the attacker directly in the server-side of the web app and is executed by the user (victim) when she accesses the infected application.&lt;/p&gt;




&lt;p&gt;🔓 &lt;strong&gt;DOM XSS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📌 This attack XSS happens when the application manipulates the DOM incorrectly, opening breaches to malicious scripts sent by URL parameters to inject malicious code.&lt;/p&gt;




&lt;p&gt;🔓 &lt;strong&gt;The question is... How to defend against attacks XSS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;📌 There's no formula - A system security is always dependent on that system context, keep this in mind, but there are practices against well-known XSS attacks to stay updated about XSS attacks. &lt;/p&gt;

&lt;p&gt;👉 Start reading about &lt;a href="https://content-security-policy.com/"&gt;Content Security Policy&lt;/a&gt;, &lt;a href="https://observatory.mozilla.org/"&gt;Mozilla Observatory&lt;/a&gt;, &lt;a href="https://owasp.org/www-community/xss-filter-evasion-cheatsheet"&gt;OWASP recommendations&lt;/a&gt;, and &lt;a href="https://www.getrevue.co/profile/obetomuniz"&gt;signing up my newsletter&lt;/a&gt;. As a web security lover, I always talk about it.&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Proxy Pattern in JavaScript</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 03 May 2021 21:03:24 +0000</pubDate>
      <link>https://forem.com/obetomuniz/proxy-pattern-in-javascript-egn</link>
      <guid>https://forem.com/obetomuniz/proxy-pattern-in-javascript-egn</guid>
      <description>&lt;p&gt;Just a catch up about how the Proxy object works on JavaScript to allow us to implement Proxy patterns.&lt;/p&gt;

&lt;p&gt;📌 JavaScript's Proxy object allows us to intercept and modifies any JavaScript object.&lt;/p&gt;

&lt;p&gt;📌 JavaScript's Proxy object is an elegant and safe way for creating or extending libraries, caching, error handling, and complex data manipulation on JavaScript.&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;arrProxy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Proxy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;get&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;property&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasOwnProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;property&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;property&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;default value&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;span class="nx"&gt;arrProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// "default value"&lt;/span&gt;
&lt;span class="nx"&gt;arrProxy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💡 What are the use cases that you most liked to use such a JavaScript feature? &lt;/p&gt;

&lt;p&gt;📚 Still, for a detailed API spec of Proxy's object in JavaScript, take a look in the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy"&gt;MDN docs&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Earn money using the Web Monetization API</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 26 Apr 2021 16:03:05 +0000</pubDate>
      <link>https://forem.com/obetomuniz/earn-money-using-the-web-monetization-api-4c9k</link>
      <guid>https://forem.com/obetomuniz/earn-money-using-the-web-monetization-api-4c9k</guid>
      <description>&lt;p&gt;&lt;em&gt;Content inspired after I receive &lt;a href="https://twitter.com/obetomuniz/status/1385026594285236234"&gt;my first payment using Web Monetization API&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🧑‍🔬  The How
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Sign up to &lt;a href="https://wallet.uphold.com/signup"&gt;wallet.uphold.com/signup&lt;/a&gt; and verify yourself&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Find the Interledger Payment Pointer in the Transact panel&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VVAwUCZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3pd0mbyoumewzccnd57p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VVAwUCZi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3pd0mbyoumewzccnd57p.png" alt="1" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NdDiauMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdsvnqcygexw4burot6e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NdDiauMm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdsvnqcygexw4burot6e.png" alt="2" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;And pick a currency target. It could be USD, BTC, etc &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UrKGcQmA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e01yeoj1wixdflccllg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UrKGcQmA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4e01yeoj1wixdflccllg.png" alt="3" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Web Monetization API needs a &lt;a href="https://paymentpointers.org/"&gt;Payment Pointer&lt;/a&gt; to address micropayments for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏗 The Where
&lt;/h2&gt;

&lt;p&gt;You could now use your already created Uphold's Payment Pointer on your website using this declaration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"monetization"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"$ilp.your.payment/pointer"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, dozens of services offer support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.coil.com/docs/monetize/content/twitch"&gt;Twitch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/devteam/you-can-now-web-monetize-your-dev-posts-but-don-t-get-your-hopes-up-too-quickly-goc"&gt;DEV.to&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hashnode.com/post/how-to-enable-web-monetization-on-your-hashnode-blog-in-2-steps-ckdu4rspj003tn0s1959c0ruq"&gt;Hashnode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cinnamon.video/"&gt;Cinnamon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://help.coil.com/docs/monetize/content/wp-overview"&gt;WordPress&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even &lt;a href="https://help.coil.com/docs/monetize/content/youtube-monetize-channel"&gt;YouTube&lt;/a&gt;, when connected in a creator account on &lt;a href="https://coil.com/creator"&gt;Coil&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  💰 The Web Monetization API
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6QnIWscz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzoxgdhsllxa29qas93x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6QnIWscz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gzoxgdhsllxa29qas93x.png" alt="Web Monetization API" width="800" height="447"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;The &lt;a href="https://webmonetization.org/"&gt;Web Monetization API is a W3C Standard&lt;/a&gt; that uses a neutral payment protocol called &lt;a href="https://interledger.org/"&gt;Interledger (ILP)&lt;/a&gt; for transferring money for anyone by anyone. &lt;/p&gt;

&lt;p&gt;The proposal help web creators avoid systems that slow down the web and creates annoying UX&lt;/p&gt;

&lt;h3&gt;
  
  
  📚 More about Web Monetization Standards
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://help.coil.com/docs/monetize/content/get-monetized-overview/index.html"&gt;Get Monetized - A Coil's Overview about Web Monetization API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=dcBxWV8fu8k"&gt;Videoin 🇧🇷 about Web Monetization API on my YouTube Channel&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>monetization</category>
      <category>javascript</category>
      <category>html</category>
    </item>
    <item>
      <title>Map and Set in JavaScript for Humans</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 19 Apr 2021 21:37:35 +0000</pubDate>
      <link>https://forem.com/obetomuniz/map-and-set-in-javascript-for-humans-h1k</link>
      <guid>https://forem.com/obetomuniz/map-and-set-in-javascript-for-humans-h1k</guid>
      <description>&lt;p&gt;Would you like to hear more about &lt;code&gt;Set&lt;/code&gt; and &lt;code&gt;Map&lt;/code&gt; objects in JavaScript? &lt;/p&gt;

&lt;p&gt;Let's catch up with them on this thread 🧵&lt;/p&gt;




&lt;p&gt;&lt;code&gt;Set&lt;/code&gt; in JavaScript 👇&lt;/p&gt;

&lt;p&gt;📌 It's not key/value like the Object type. Keys are just values exposed&lt;/p&gt;

&lt;p&gt;📌 Don't accept duplicated values&lt;/p&gt;

&lt;p&gt;📌 It's iterable with &lt;code&gt;forEarch&lt;/code&gt; method and &lt;code&gt;for...of&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;📌 Conceptually is similar to &lt;code&gt;[]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;code&gt;Set&lt;/code&gt; is useful to remove duplicates on &lt;code&gt;[]&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;&lt;code&gt;Map&lt;/code&gt; in JavaScript 👇&lt;/p&gt;

&lt;p&gt;📌 Allow/preserve any key type. Even objects&lt;/p&gt;

&lt;p&gt;📌 Don't expose insecure data properties&lt;/p&gt;

&lt;p&gt;📌 Iterate with &lt;code&gt;forEarch&lt;/code&gt; method and &lt;code&gt;for...of&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;📌 Stay the insertion order doesn't matter the type&lt;/p&gt;

&lt;p&gt;💡 Prefer &lt;code&gt;Map&lt;/code&gt; instead of &lt;code&gt;{}&lt;/code&gt; for client-side data manipulation.&lt;/p&gt;




&lt;p&gt;Thoughts on &lt;code&gt;Map&lt;/code&gt;, &lt;code&gt;Set&lt;/code&gt;, &lt;code&gt;{}&lt;/code&gt;, and &lt;code&gt;[]&lt;/code&gt; in JavaScript 👇&lt;/p&gt;

&lt;p&gt;📌 Each has a specific usage in JS&lt;/p&gt;

&lt;p&gt;📌 Use &lt;code&gt;{}&lt;/code&gt; for data traffic from the server. &lt;/p&gt;

&lt;p&gt;📌 &lt;code&gt;Set&lt;/code&gt; helps apply omit, diff, etc. on &lt;code&gt;[]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;📌 &lt;code&gt;Map&lt;/code&gt; return size. &lt;code&gt;{}&lt;/code&gt; don't return size&lt;/p&gt;

&lt;p&gt;🗣 There's not a silver bullet. Use them carefully.&lt;/p&gt;




&lt;p&gt;😉 Hope that you now understand better such useful objects on JavaScript, they are highly valuable, and master them will make you a better JavaScript Developer.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Using "noopener" and ”noreferrer” against Phishing Attacks</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 12 Apr 2021 19:24:45 +0000</pubDate>
      <link>https://forem.com/obetomuniz/using-noopener-and-noreferrer-against-phishing-attacks-3jj9</link>
      <guid>https://forem.com/obetomuniz/using-noopener-and-noreferrer-against-phishing-attacks-3jj9</guid>
      <description>&lt;p&gt;Want to help users to avoid some Phishing Attacks with &lt;strong&gt;HTML&lt;/strong&gt;? &lt;/p&gt;

&lt;p&gt;👉 Use &lt;code&gt;rel="noopener noreferrer"&lt;/code&gt; while adding external links to your website to improve user navigation security.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"noopener noreferrer"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
 External Link
&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;🐿 &lt;strong&gt;noopener&lt;/strong&gt;: tells the browser to remove sensitive data from &lt;code&gt;window.opener&lt;/code&gt; object when the user arrives at the destination website.&lt;/p&gt;

&lt;p&gt;🤓 &lt;strong&gt;noreferrer&lt;/strong&gt;: protect sensitive data of the origin website removing it from the &lt;code&gt;Referrer&lt;/code&gt; header while the user navigates between origin website and destination website.&lt;/p&gt;




&lt;p&gt;😋 Super easy security strategy to implement. Adopt this recommendation without moderation. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>cybersecurity</category>
      <category>security</category>
      <category>html</category>
    </item>
    <item>
      <title>CSS Custom Properties with @property</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 05 Apr 2021 14:19:38 +0000</pubDate>
      <link>https://forem.com/obetomuniz/css-custom-properties-with-property-5dgm</link>
      <guid>https://forem.com/obetomuniz/css-custom-properties-with-property-5dgm</guid>
      <description>&lt;p&gt;Have you heard about the CSS &lt;strong&gt;@property&lt;/strong&gt; statement?&lt;/p&gt;




&lt;p&gt;📣 @property is a &lt;strong&gt;CSS Houdini&lt;/strong&gt; &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule"&gt;at-rule&lt;/a&gt; that allows us to configure CSS custom properties by data type using the &lt;code&gt;syntax&lt;/code&gt; field, default values using the &lt;code&gt;initial-value&lt;/code&gt; field, and set if it allows inheritance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@property&lt;/span&gt; &lt;span class="n"&gt;--colorPrimary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;syntax&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;"&amp;lt;color&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;initial-value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;magenta&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;inherits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* Fallback for browsers without @property support. */&lt;/span&gt;
  &lt;span class="py"&gt;--colorPrimary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;magenta&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.text&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--colorPrimary&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;🪄 The nicest aspect about &lt;strong&gt;@property&lt;/strong&gt; is the capability to enhance CSS dynamics through high-level declarations with simplicity and certain performance enhancements.&lt;/p&gt;

&lt;p&gt;🔬 Some use cases for &lt;strong&gt;@property&lt;/strong&gt; statement are data type validation on CSS and animations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@property&lt;/span&gt; &lt;span class="n"&gt;--status&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;inherits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;initial-value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;syntax&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;'&amp;lt;percentage&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.progress-bar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--status&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;5px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;gold&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;animation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt; &lt;span class="m"&gt;2s&lt;/span&gt; &lt;span class="n"&gt;forwards&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@keyframes&lt;/span&gt; &lt;span class="n"&gt;progress&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nt"&gt;to&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="py"&gt;--status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;😋 Really cool, right? &lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>CSS Property: content-visibility</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Mon, 29 Mar 2021 19:19:01 +0000</pubDate>
      <link>https://forem.com/obetomuniz/css-property-content-visibility-2kn1</link>
      <guid>https://forem.com/obetomuniz/css-property-content-visibility-2kn1</guid>
      <description>&lt;p&gt;👉 The CSS property &lt;code&gt;content-visibility&lt;/code&gt; allows the web developer inform to the browser rendering engine which parts of the page are out of the user view.&lt;/p&gt;

&lt;p&gt;😍 With this info, the browser can optimize the render flow time to focus on where really matters for the user.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;content-visibility: visible;
content-visibility: hidden;
content-visibility: auto;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🪔  &lt;code&gt;content-visibility&lt;/code&gt; using &lt;code&gt;visible&lt;/code&gt; or &lt;code&gt;hidden&lt;/code&gt; values show or hide respectively the content on a rendering engine level.&lt;/p&gt;

&lt;p&gt;⚡️  &lt;code&gt;content-visibility&lt;/code&gt; with value &lt;code&gt;auto&lt;/code&gt; tells the browser rendering engine to render the elements based on user needs.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>webperf</category>
    </item>
    <item>
      <title>globalThis in a nutshell</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Wed, 24 Mar 2021 17:25:20 +0000</pubDate>
      <link>https://forem.com/obetomuniz/globalthis-in-a-nutshell-597h</link>
      <guid>https://forem.com/obetomuniz/globalthis-in-a-nutshell-597h</guid>
      <description>&lt;p&gt;&lt;code&gt;globalThis&lt;/code&gt; is a global object reference for client and server applications using JavaScript.&lt;/p&gt;

&lt;p&gt;👉 It’s helpful to create cross-platform apps and libraries.&lt;/p&gt;

&lt;p&gt;🔒 Due to security, &lt;code&gt;globalThis&lt;/code&gt; is a Proxy reference of the global object on the browser.&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;globalThis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://...&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
    </item>
    <item>
      <title>Build Time CSS-in-JS: Explained</title>
      <dc:creator>Beto Muniz</dc:creator>
      <pubDate>Wed, 17 Mar 2021 19:51:10 +0000</pubDate>
      <link>https://forem.com/obetomuniz/build-time-css-in-js-explained-35ld</link>
      <guid>https://forem.com/obetomuniz/build-time-css-in-js-explained-35ld</guid>
      <description>&lt;h3&gt;
  
  
  🧵 Have you heard about Build Time CSS-in-JS libraries?
&lt;/h3&gt;




&lt;p&gt;🔥 &lt;strong&gt;Build Time CSS-in-JS&lt;/strong&gt; libraries are moving a step forward about use CSS-in-JS in a performance-first manner remaining the ergonomic CSS-in-JS design and processing the CSS in build time instead of leaving it to JS runtime. It aims to remove the current CSS-in-JS negative cost.&lt;/p&gt;

&lt;p&gt;⚡️ Still, &lt;strong&gt;Build Time CSS-in-JS&lt;/strong&gt; libraries reduce significantly or remove completely the downsides while parsing, generating, and rendering CSS through JS, which impacts directly and positively memory consumption and metrics like &lt;a href="https://web.dev/optimize-lcp/"&gt;Largest Contentful Paint&lt;/a&gt;, which also impacts the page load UX and performance.&lt;/p&gt;




&lt;p&gt;🙅‍♂️ There are a few examples and proof of concepts exploring the Build Time CSS-in-JS approach. The most popular proposals that I know are:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Linaria&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The most popular, powerful, and active on the list.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/callstack/linaria"&gt;https://github.com/callstack/linaria&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Compiled&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A familiar and performant compile time CSS-in-JS library for React created by Atlassian. &lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/atlassian-labs/compiled"&gt;https://github.com/atlassian-labs/compiled&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;astroturf&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A library that lets you write CSS in your JavaScript files without adding any runtime layer, and with your existing CSS processing pipeline.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/4Catalyzer/astroturf"&gt;https://github.com/4Catalyzer/astroturf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;style9&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CSS-in-JS compiler based on the ideas of &lt;a href="https://www.youtube.com/watch?v=9JZHodNR184&amp;amp;t=229s"&gt;Facebook's stylex&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/johanholmerin/style9"&gt;https://github.com/johanholmerin/style9&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;🎬 And that’s it from me - I’m fascinated by this and still learning. So let me know if you know more libraries like these and/or more about this topic.&lt;/p&gt;

</description>
      <category>webperf</category>
      <category>webdev</category>
      <category>css</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
