<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Antón Molleda on Medium]]></title>
        <description><![CDATA[Stories by Antón Molleda on Medium]]></description>
        <link>https://medium.com/@molant?source=rss-53287ad0d82c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZuCUe_FOnbFrMFWg.png</url>
            <title>Stories by Antón Molleda on Medium</title>
            <link>https://medium.com/@molant?source=rss-53287ad0d82c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 04:44:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@molant/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[webhint can now analyze password protected sites]]></title>
            <link>https://medium.com/webhint/webhint-can-now-analyze-password-protected-sites-6a3776359921?source=rss-53287ad0d82c------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a3776359921</guid>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[webhint]]></category>
            <category><![CDATA[chromium]]></category>
            <dc:creator><![CDATA[Antón Molleda]]></dc:creator>
            <pubDate>Wed, 25 Sep 2019 14:29:22 GMT</pubDate>
            <atom:updated>2019-09-25T14:29:22.973Z</atom:updated>
            <content:encoded><![CDATA[<h3>Analyzing password-protected sites with webhint</h3><p>Two of the most requested features the team has received are to run webhint in browsers other than Chrome and the ability to analyze password-protected websites. Up until recently that was not possible, but things have changed!</p><p>The newest versions of webhint come with the new connector-puppeteer that allows webhint to talk to any browser that implements the subset of the debugging protocol used by <a href="http://pptr.dev/">puppeteer</a>. Right now, that is any modern Chromium-based browser, but <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1545057">Firefox will support it in the near future as well</a> 👏.</p><p>This new package comes with some nice features. For example, it will automatically search for a valid Chromium-based executable. If you have multiple installed, the priority is Chrome &gt; Chromium &gt; Edge.</p><p>If you want to specify one, you have two options:</p><ol><li>Use the browser option and one of the shortcuts:</li></ol><pre>{<br>  &quot;connector&quot;: {<br>    &quot;name&quot;: &quot;puppeteer&quot;,<br>    &quot;options&quot;: {<br>      &quot;browser&quot;: &quot;Chrome|Chromium|Edge&quot;<br>    }<br>  },<br>  ...<br>}</pre><p>2. Specify the executable path directly via puppeteer-options:</p><pre>{<br>  &quot;connector&quot;: {<br>    &quot;name&quot;: &quot;puppeteer&quot;,<br>    &quot;options&quot;: {<br>      &quot;puppeteer-options&quot;: {<br>        &quot;executablePath&quot;: &quot;path/to/browser&quot;<br>      }<br>    }<br>  },<br>  ...<br>}</pre><p>The connector supports more configurations (check all of them on <a href="https://webhint.io/docs/user-guide/connectors/connector-puppeteer/">this page</a>), but probably the most exciting one is the possibility to analyze password-protected sites 🕵🏽‍♀️.</p><h3>You can now analyze password-protected sites with webhint</h3><p>This has been one of the most requested features, and while there were some hacks to make it work sometimes, the experience was far from ideal.</p><p>It has taken us more time than expected, but support for this feature has finally landed and we couldn’t be more excited! 🎉</p><p>To test it, you will need to provide the user, password, input selectors, and submit input selector in your <a href="https://webhint.io/docs/user-guide/configuring-webhint/summary/">.hintrc file</a>:</p><pre>{<br>    &quot;connector&quot;: {<br>        &quot;name&quot;: &quot;puppeteer&quot;,<br>        &quot;options&quot;: {<br>            &quot;auth&quot;: {<br>                &quot;user&quot;: {<br>                    &quot;selector&quot;: &quot;string&quot;,<br>                    &quot;value&quot;: &quot;string&quot;<br>                },<br>                &quot;password&quot;: {<br>                    &quot;selector&quot;: &quot;string&quot;,<br>                    &quot;value&quot;: &quot;string&quot;<br>                },<br>                &quot;submit&quot;: {<br>                    &quot;selector&quot;: &quot;string&quot;<br>                }<br>            }<br>        }<br>    },<br>    ...<br>}</pre><p>webhint will:</p><ol><li>Navigate to your target URL (<a href="https://example.com)/">https://example.com</a>/secured) that should redirect to a login page (https://example.com/login),</li><li>Use the information provided in the auth property to fill the form and submit it, and</li><li>Analyze the page that appears after the navigation of submitting the form (https://example.com/secured).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*b4LW4Qq3h9HyWY9_pAli-Q.png" /><figcaption>GitHub’s login form</figcaption></figure><p>If your website uses Basic HTTP Auth, that is supported, too! The fields user and password should be a string only:</p><pre>{<br>    &quot;connector&quot;: {<br>        &quot;name&quot;: &quot;puppeteer&quot;,<br>        &quot;options&quot;: {<br>            &quot;auth&quot;: {<br>                &quot;user&quot;: &quot;string&quot;,<br>                &quot;password&quot;: &quot;string&quot;<br>            }<br>        }<br>    },<br>    ...<br>}</pre><h4>How do I integrate auth in CI without writing the credentials?</h4><p>As we all know, storing your credentials in plain text files is not a good idea. To solve this issue, you can use environment variables. Starting with webhint v5.1.0 you can pass specific configurations via environment variables. For example:</p><p>webhint_connector_options_auth_user_value=johndoe</p><p>webhint_connector_options_auth_password_value=P@ssw0rd!</p><p>gets transformed into:</p><pre>{<br>    &quot;connector&quot;: {<br>        &quot;options&quot;: {<br>            &quot;auth&quot;: {<br>                &quot;user&quot;: {                    <br>                    &quot;value&quot;: &quot;string&quot;<br>                },<br>                &quot;password&quot;: {                  <br>                    &quot;value&quot;: &quot;string&quot;<br>                }<br>            }<br>        }<br>    }<br>}</pre><p>It is then merged with the contents of your .hintrc file. (For this particular case, your .hintrc file should have the selectors.)</p><p>Properties defined in your .hintrc file have higher priority than those in your environment variables in case of duplicates.</p><p><a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&amp;tabs=yaml%2Cbatch#secret-variables">Azure Pipelines has the concept of secrets</a>, <a href="https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml">Travis CI has encrypted environment variables</a>, and other CI systems have similar features, so make sure to use them to not leak any information!</p><h4>How can I run a quick test?</h4><p>The fastest way would be to create a .hintrc file similar to the ones above and run webhint via npx:</p><pre>npx hint https://mysecuresite.com/secure/page</pre><p>You should see your browser open, authenticate, and navigate to the final URL.</p><h3>We want your feedback!</h3><p>Please let us know what you think of this new feature and in what ways we can improve. You can share your thoughts in this post, <a href="https://github.com/webhintio/hint/issues/new/choose">GitHub</a>, <a href="https://twitter.com/webhintio">Twitter</a> or <a href="https://gitter.im/webhintio/Lobby">Gitter</a>.</p><p>Thank you! 🙏</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a3776359921" width="1" height="1" alt=""><hr><p><a href="https://medium.com/webhint/webhint-can-now-analyze-password-protected-sites-6a3776359921">webhint can now analyze password protected sites</a> was originally published in <a href="https://medium.com/webhint">webhint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[webhint: a hinting engine for the web]]></title>
            <link>https://medium.com/webhint/webhint-a-hinting-engine-for-the-web-ef0d3fa32ea9?source=rss-53287ad0d82c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef0d3fa32ea9</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tools]]></category>
            <category><![CDATA[webhint]]></category>
            <dc:creator><![CDATA[Antón Molleda]]></dc:creator>
            <pubDate>Tue, 07 Aug 2018 20:12:11 GMT</pubDate>
            <atom:updated>2018-08-07T20:12:11.583Z</atom:updated>
            <content:encoded><![CDATA[<p>It was about a year ago that <a href="https://js.foundation/announcements/2017/06/22/sonar-js-foundation-welcomes-newest-project">sonarwhal was open sourced at the JS Foundation</a>. We&#39;ve come a long way since then, <a href="https://medium.com/sonarwhal/sonarwhal-is-v1-4262a2f887c9">implementing new features, and widening the scope of the project</a>. We&#39;ve also had the opportunity to talk with many developers from different countries and we realized that there were some challenges with the name: some people didn&#39;t know what narwhals are (or that they are real), trouble remembering or knowing what it was about, others confused it with <a href="https://www.sonarsource.com/">SonarSource</a>, and some had issues pronouncing it correctly. Even more, it looks like <a href="https://code.fb.com/android/open-sourcing-sonar-a-new-extensible-debugging-tool-2/">sonar has become a popular project name</a> (although the renaming was already underway when this project was announced).</p><p>Because of these reasons we&#39;ve decided to rename the project. Deciding on a new name wasn’t an easy task and there were many ̶h̶e̶a̶t̶e̶d̶ internal debates. In the end <strong>webhint </strong>was the winner: the new name not only communicates what the tool does in a more direct fashion; it also aligns better with our philosophy: not all projects have the same requirements and it’s up to you, the developer, to decide what’s relevant or not. webhint provides you hints on how you can make it better. Extensibility has always been in the top of our minds. There are many cases where a developer might want to create a custom hint and we want this to be as easy as possible. You can think of webhint not only as tool for best practices, but also as an engine to create specific test for the things that matter in your development.</p><h3>🤔 How do I get webhint?</h3><p>webhint is distributed via npm and you can get it as follows:</p><pre>npm install hint</pre><p>📦 The hint package was gracefully donated by <a href="https://twitter.com/nzgb">Nicolás Bevacqua</a> to whom we will be always thankful 🙏.</p><p>The previous sonarwhal package has been deprecated as well as all the related ones.</p><h3>🤯 What else is new in webhint?</h3><p>This release focuses almost entirely on improving the user experience rather than adding more rules or features.</p><p>🚀 We’ve <a href="https://github.com/sonarwhal/sonarwhal/issues/896">improved the start-up time</a> (almost 300% faster!). To achieve this we’ve done a few things such as <a href="https://github.com/sonarwhal/sonarwhal/issues/896#issuecomment-392137941">lazy loading parts of the code</a> that are not needed in all scenarios, reduce the number of dependencies, optimize dependencies for global installation, and extract not critical scenarios to their own packages (and bundling those with webpack as well!).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ppDM7D_U7m_hOYY5td8Qmg.png" /><figcaption>4.4 seconds to start the user action and 3,018 requires initially</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pprh6Qp2sHh7zX6wOBt1RA.png" /><figcaption>1.3 seconds and 930 requires only 🎉</figcaption></figure><p>🎁 And talking about new packages, our colleague <a href="https://medium.com/u/c9acea0bae6e">John-David Dalton</a> <a href="https://blog.npmjs.org/post/173239798780/beyond-npm6-the-future-of-the-npm-cli">added support to </a><a href="https://blog.npmjs.org/post/173239798780/beyond-npm6-the-future-of-the-npm-cli">npm init &lt;create-pkg&gt; and its alias </a><a href="https://blog.npmjs.org/post/173239798780/beyond-npm6-the-future-of-the-npm-cli">npm create &lt;create-pkg&gt;</a>. This is an awesome feature we decided to take advantage of, so now you can create new configuration files using npm create hintrc, r̵u̵l̵e̵s̵ <a href="https://medium.com/docs/user-guide/concepts/hints/">hints</a> with npm create hint or <a href="https://webhint.io/docs/user-guide/concepts/parsers/">parsers</a> with npm create parser. These commands will do all the necessary scaffolding to get you started:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fsj77FKFqIO0%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dsj77FKFqIO0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fsj77FKFqIO0%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d7d91ceb59c6f0412c459f316d80ce4/href">https://medium.com/media/3d7d91ceb59c6f0412c459f316d80ce4/href</a></iframe><p>📝 One of the pieces of feedback we’ve heard from new users of the CLI is that it can be a bit overwhelming to use it for the first time. To get you to the results faster, we now provide a <a href="https://webhint.io/docs/user-guide/#default-configuration">default configuration</a> that will be used when none is found. We’ve also added links through the different steps so you can quickly access the information you need to understand better what is happening and what actions you can take. If you have feedback on how to make this better, <a href="https://github.com/webhintio/hint/issues/new">please let us know!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*cYrjV1iMev3d0WaTBXmf8A.png" /><figcaption>webhint notifying the user it couldn’t find a valid configuration file and the default one will be used</figcaption></figure><p>🌐 Another improvement we’ve made to the user experience is that if no configuration file is found in the execution folder, it will search for one in your home folder. This is great if you’ve decided to install webhint globally and want to quickly analyze a site with a configuration that’s not the default one.</p><p>Another thing related to the configuration is that it supports <a href="https://webhint.io/docs/user-guide/further-configuration/using-relative-resources/">relative paths</a>. Now it’s easier than ever to extend from local configurations or test your custom hints:</p><pre>{<br>    &quot;extends&quot;: [&quot;web-recommended&quot;],<br>    &quot;hints&quot;: {<br>        &quot;../my-hint/hint.js&quot;: &quot;error&quot;<br>    }<br>}</pre><p>But this is not all! We’ve also updated the <a href="https://webhint.io/docs/user-guide/">documentation</a>, <a href="https://webhint.io/docs/user-guide/hints/hint-no-broken-links/">added</a> <a href="https://webhint.io/docs/user-guide/hints/hint-no-p3p/">new</a> <a href="https://webhint.io/docs/user-guide/hints/hint-minified-js/">hints</a>, added a <a href="https://webhint.io/docs/contributor-guide/getting-started/events/#parsecss">CSS parser</a>, updated the <a href="https://webhint.io/">project’s homepage</a>, and <a href="https://github.com/webhintio/hint/issues?q=label%3Atype%3Abug+is%3Aclosed">fixed a bunch of bugs</a>.</p><p>This is a great initial release of webhint so make sure to test it out!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef0d3fa32ea9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/webhint/webhint-a-hinting-engine-for-the-web-ef0d3fa32ea9">webhint: a hinting engine for the web</a> was originally published in <a href="https://medium.com/webhint">webhint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[sonarwhal is v1 ]]></title>
            <link>https://medium.com/webhint/sonarwhal-is-v1-4262a2f887c9?source=rss-53287ad0d82c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4262a2f887c9</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[webhint]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Antón Molleda]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 16:01:01 GMT</pubDate>
            <atom:updated>2018-09-07T03:03:13.420Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Update:</strong> sonarwhal has been renamed to webhint. Check <a href="https://medium.com/webhint/webhint-a-hinting-engine-for-the-web-ef0d3fa32ea9">the announcement</a> to know what else has change.</p><p>A bit over a year ago we started working on a best practices tool for the web called <a href="https://sonarwhal.com/">sonarwhal</a>. Today, we are announcing the release of its first major version. With today’s launch, we’d like to talk you through a look back at how sonarwhal started, and the journey to v1 over the past few months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_dwQDdT-VhE12vyRjf-v_w.png" /><figcaption>sonarwhal logo</figcaption></figure><p>It all started with feedback from developers, partners, and from our own experiences building for the web. The web platform is becoming richer and richer at a faster pace than ever before: we now have web experiences we couldn’t even imagine a few years back. Sites can work offline, push notifications (even when the user is not visiting the site), and even run code at native speeds with WebAssembly. On top of keeping up to date, developers also need to know about many other things like accessibility, security, performance, bundling, transpiling, etc.</p><p>Every day we see sites that have a great architecture, built with the latest libraries and tools, but don’t use the right cache policy for their static assets, don’t compress everything they should be compressing, could do a better job in terms of security, and so on. The web is complex and it can be easy to forget, or not know about something at any point during the development process.</p><blockquote>Being a web developer can be overwhelming</blockquote><p>What could we do to help web developers make their sites faster, more secure and accessible while at the same time making sure they remain interoperable cross browser? And that’s how all started. Picking the name was the easiest part: the team loves narwhals and they have <a href="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0162069">one of the best echolocation beams in nature</a> (or sonars) so it was an obvious choice. We knew from the beginning that we wanted sonarwhal to be built by and for the web community. We didn’t want to indoctrinate our personal opinions into sonarwhal’s rules. We wanted sonarwhal to be backed by deep research, remain neutral, and allow contributions from any individual or company. Thus we decided sonarwhal should be an <a href="https://js.foundation/announcements/2017/06/22/sonar-js-foundation-welcomes-newest-project">open source project under the JS Foundation</a>.</p><p>Since then, we’ve kept ourselves busy listening to your feedback and implementing many of the goals we had back then, while adding some new ones.</p><blockquote>When creating a new rule we follow the 80/20 rule:</blockquote><blockquote>80% of the time is research and 20% is coding</blockquote><p>If there’s one thing we are most proud of, it’s the extensive research we do on each subject and how deep the rules go to check that everything is as it should be.</p><p>Just to give you some examples:</p><ul><li>The <a href="https://sonarwhal.com/docs/user-guide/rules/rule-http-compression/">http-compressionrule</a> will perform several requests for each resource with different headers and check the content to validate the server is actually respecting them. E.g.: When resources are requested uncompressed, does the server actually respect what was requested and servers them uncompressed? Is the server doing User-Agent sniffing instead of relying on the Accept-Encoding header of the request? Is the server compressing resources using Zopfli when requests are made advertising support for gzip compression?</li><li>The <a href="https://sonarwhal.com/docs/user-guide/rules/PWA/">web manifest rules</a> are also interesting. Does the web manifest point to an image? Does that image exist? Does the image meet the recommended resolution and file size? Does it have the right format to be used by any browser? Is the name of the web application short enough to be displayed on all platforms?</li><li>The web is full of lies (<a href="http://lists.w3.org/Archives/Public/public-html/2014Feb/0040.html">starting with the user-agent string</a>). Just because a file ends with .png and has content-type: image/png doesn’t mean it’s an PNG image. It could very well be a JPEG file, or something completely different. And the same goes for every downloaded resource. The <a href="https://sonarwhal.com/docs/user-guide/rules/rule-content-type/">content-typerule</a> will look at the bytes of the resource and verify the server is actually serving what it says it does, and where applicable, is specifying the proper <a href="https://sonarwhal.com/docs/user-guide/rules/rule-content-type/">charset</a>.</li></ul><p>And the list goes on…</p><blockquote>More than 30 rules in 6 categories (and counting!)</blockquote><p>sonarwhal validates many different things: from <a href="https://sonarwhal.com/docs/user-guide/rules/rule-axe/">accessibility</a> and <a href="https://sonarwhal.com/docs/user-guide/rules/rule-content-type/">content types</a> to verifying your <a href="https://sonarwhal.com/docs/user-guide/rules/rule-no-vulnerable-javascript-libraries/">JavaScript libraries don’t have any known vulnerabilities</a> and that you are using <a href="https://sonarwhal.com/docs/user-guide/rules/rule-sri/">SRI to validate that no one has tampered with the code</a>.</p><p>Some of the issues require developers to change their code. Others require tweaking of the server configurations. Changing the configurations might not be obvious, especially when targeting only certain resources types, or newer things such as <a href="https://en.wikipedia.org/wiki/Brotli">Brotli</a> compression where there isn’t much information available yet on how to do it. So, to make the developer experience easier we’ve also added <a href="https://medium.com/sonarwhal/improving-the-developer-experience-with-configurations-for-apache-and-iis-a2729c8eb801">examples for Apache and IIS</a> for the rules that require it.</p><blockquote>Want to quickly test a site? Use the <a href="https://sonarwhal.com/scanner/">online version</a>!</blockquote><p>sonarwhal runs on top of Node.js and is distributed via <a href="https://npmjs.org/package/sonarwhal">npm</a>. But what happens if you want to check a site using your mobile phone? Or maybe your IT administrator doesn’t allow you to install any tool.</p><p>We needed a way to scale and make sonarwhal available anywhere with an internet connection. So, in November of last year <a href="https://medium.com/sonarwhal/sonarwhal-linting-the-web-forward-c485df1f002a">we launched the online version</a>. Since then, more than 160,000 URLs have been analyzed.</p><p>Each result page has its own permalink so to allow you can to go back to it later, or share it with anyone.</p><p>The code for the online scanner <a href="https://github.com/sonarwhal/online-service/">is available on GitHub</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wdqj42wLMjlahkdBr4hKtA.png" /><figcaption><a href="https://sonarwhal.com/scanner/97a933a1-2b8e-4917-878b-493ddd313a58">Scan results for https://example.com</a></figcaption></figure><blockquote>Configure sonarwhal to your needs</blockquote><p>We think tools should be helpful and not be in your way. We can tell you what we think it’s important but at the end of the day, you are the one that best understands what you are building and what requirements you have. So, we build sonarwhal in such a way that while it comes with strong defaults, it still allows you to decide what rules are relevant to your project, what URLs should be ignored, what browser you want to use... basically allow you to configure everything.</p><p>To make it easier to reuse configurations, you can now <em>extend </em>from one or more and tweak the properties you want.</p><p>For example, to use the configuration <a href="https://www.npmjs.com/package/@sonarwhal/configuration-web-recommended">“web-recommended”</a> you just have to:</p><p>npm install @sonarwhal/configuration-web-recommended</p><p>And tell your .sonarwhalrc file to extend from it:</p><pre>{<br>  &quot;extends&quot;: [&quot;web-recommended&quot;]<br>}</pre><p>If you want to tweak it, you can do this:</p><pre>{<br>  &quot;extends&quot;: [&quot;web-recommended&quot;],<br>  &quot;ignoredUrls&quot;: [{<br>    &quot;domain&quot;: &quot;.*\\.domain1\\.com/.*&quot;,<br>    &quot;rules&quot;: [&quot;*&quot;]<br>  }],<br>  &quot;rules&quot;: {<br>    &quot;highest-available-document-mode: [&quot;error&quot;, {<br>      &quot;requireMetaTag&quot;: true<br>    }]<br>  }<br>}</pre><p>The above snippet will use the defaults of “web-recommended”, ignore all resources that match the regular expression .*\.domain1\.com/.* and <a href="https://sonarwhal.com/docs/user-guide/rules/rule-highest-available-document-mode/#can-the-rule-be-configured">enforce the </a><a href="https://sonarwhal.com/docs/user-guide/rules/rule-highest-available-document-mode/#can-the-rule-be-configured">X-UA-Compatiblemeta tag instead of the header</a>.</p><p>Without doubt, one of our favorite features is the adaptability of the rules. Depending on <a href="https://sonarwhal.com/docs/user-guide/further-configuration/browser-context/">the browsers you want to support</a>, some rules will adapt their feedback telling you the best approach for your specific case. We believe this is really important because not everybody gets to develop for the latest browser versions.</p><blockquote>Easily extend sonarwhal with parsers to analyze files such as config files</blockquote><p>Catching issues early in the development cycle is usually better than when the project is already shipped. To help with this we created the “local connector” that allows you to validate the files you are working with.</p><p>Building a website these days usually requires more than just writing HTML, JavaScript and CSS files. Developers use task managers, bundlers, transpilers, and compilers to generate their code. And each one of these needs to be configured, which in some cases is not easy. To tackle this problem, we came up with the concept of a parser. A parser understands a resource format and is capable of emitting information about it so rules can use it.</p><p>Parsers are a powerful concept. They allow sonarwhal to be expanded to support new scenarios we couldn’t imagine when we first started the project. In our case, we’ve started creating parsers for config files of the most popular tools used during the build process ( tsconfig.json, .babelrcand webpack.config.js so far) and rules related to them:</p><ul><li>By default TypeScript output is ES3 compatible, but maybe you don’t need to go all the way down and could be using ES5, ES6, etc. Using the information of your browserslist, we’ll tell you what target you should have in your tsconfig.json file.</li><li>If you are using webpack, you should have &quot;modules&quot;: false in your .babelrc file to make sure you have better tree shaking and thus, less generated code.</li></ul><p>But these are just some easy examples of things we are doing. Parsers allow you to create rules for virtually anything. For example, someone could create a parser that understands the metadata of image files and then a rule that checks that all the images have a valid “copyright status”.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPgYNPWnFxeM%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPgYNPWnFxeM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPgYNPWnFxeM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/50cba2b8b572798832bc86f3216c1355/href">https://medium.com/media/50cba2b8b572798832bc86f3216c1355/href</a></iframe><blockquote>sonarwhal v1 is now available! Go get it while it’s fresh!</blockquote><p>As you can see, we’ve been busy! After all that, we’re finally ready to announce the first major version of sonarwhal!</p><p>While this is a big milestone for us, it doesn’t mean we are going to remain idle. Indeed, now that <a href="https://blog.github.com/2018-03-28-improved-organization-project-permissions/">GitHub organization projects can be public</a> we’ve <a href="https://github.com/orgs/sonarwhal/projects/1">opened up ours</a> so you can know the project’s priorities and what we are working on.</p><p>Some of the things we are more excited about are:</p><ul><li><a href="https://github.com/sonarwhal/sonarwhal/issues?q=is%3Aissue+is%3Aopen+label%3Aarea%3Arule">New rules</a>: you can expect more rules around security, performance, PWA, and development very soon.</li><li><a href="https://github.com/sonarwhal/sonarwhal/issues/421">User actions for the browser</a>: sometimes the page or scenario you need to test requires a bit of interaction to get to it. We are looking in ways to allow you to control the browser before a scan.</li><li><a href="https://github.com/sonarwhal/sonarwhal.com/issues/233">Custom configuration for the online scanner</a>: the user should be capable of deciding every aspect, even when using the online scanner.</li><li><a href="https://github.com/sonarwhal/sonarwhal.com/issues/232">Notifications for the online scanner</a>: some websites take longer than others to scan and is easy to forget you have something running on a background tab. We will add opt-in notifications to let you know when all the results are gathered.</li></ul><p>sonarwhal is completely open source and community driven. Your feedback is really appreciated and helps us prioritize this list. And if you want to help developers all around the world, <a href="https://github.com/sonarwhal/sonarwhal">join us</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4262a2f887c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/webhint/sonarwhal-is-v1-4262a2f887c9">sonarwhal is v1 🎉</a> was originally published in <a href="https://medium.com/webhint">webhint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Faster (re)load times with the right HTTP cache]]></title>
            <link>https://medium.com/webhint/faster-re-load-times-with-the-right-http-cache-e18c0fa9a919?source=rss-53287ad0d82c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e18c0fa9a919</guid>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[caching]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[webhint]]></category>
            <dc:creator><![CDATA[Antón Molleda]]></dc:creator>
            <pubDate>Thu, 08 Feb 2018 16:34:54 GMT</pubDate>
            <atom:updated>2018-09-07T03:04:00.682Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Update:</strong> sonarwhal has been renamed to webhint. Check <a href="https://medium.com/webhint/webhint-a-hinting-engine-for-the-web-ef0d3fa32ea9">the announcement</a> to know what else has change.</p><p>There’s no question that performance is a hot topic in web development. Rare is the day where there isn’t a new framework, plugin, pattern, or standard that can help websites be faster.</p><p>While all these new things are important, we believe that web developers should know the fundamentals before looking into other techniques. There are many things that can improve the load time of a website with very little <br><br>effort. One of these things is to have the right cache strategy.</p><p>Some of the benefits of a good caching strategy are:</p><ul><li>Shorter load times</li><li>Less bandwidth required</li><li>Reduce server costs</li><li>Have a predictable behavior across browsers</li></ul><p>Even though this might seem obvious, <a href="http://httparchive.org/about.php#maxage0">about 50% of resources on the web can’t be cached due to their configuration</a>, and 36% do not have a Cache-Control header.</p><p>To help you identify possible issues with your site and browser caches, we’ve developed the <a href="https://sonarwhal.com/docs/user-guide/rules/http-cache/">http-cache rule</a>. This rule tests that:</p><ul><li>All responses have a cache-control header</li><li>The cache-control directives are correct</li><li>Static assets (scripts, stylesheets, images, etc.) use <a href="https://www.keycdn.com/support/what-is-cache-busting/">cache busting</a>, have a long expiry value (1 year by default), and use the <a href="https://bitsup.blogspot.ro/2016/05/cache-control-immutable.html">immutable directive</a></li><li>HTML content has a short expiry value (3 minutes or less)</li></ul><p>As usual, <a href="https://sonarwhal.com/docs/user-guide/rules/http-cache/#can-the-rule-be-configured">sonarwhal allows you to configure this rule</a> to better fit your needs allowing you to:</p><ul><li>Use another regular expression for cache busting in case the built-in one doesn&#39;t work for you</li><li>Modify the recommended values for max-age for static assets and HTML content</li></ul><p>If you want to know more about browser caching and the reasons of the tests above, we recommend you read “<a href="https://jakearchibald.com/2016/caching-best-practices/"><em>Caching best practices &amp; max-age gotchas”</em> by Jake Archibald</a>.</p><p>The rule is enabled on <a href="https://sonarwhal.com/scanner/">sonarwhal’s online scanner</a>, so you can check how well your site is doing right now!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e18c0fa9a919" width="1" height="1" alt=""><hr><p><a href="https://medium.com/webhint/faster-re-load-times-with-the-right-http-cache-e18c0fa9a919">Faster (re)load times with the right HTTP cache</a> was originally published in <a href="https://medium.com/webhint">webhint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[sonarwhal: Linting the web forward]]></title>
            <link>https://medium.com/webhint/sonarwhal-linting-the-web-forward-c485df1f002a?source=rss-53287ad0d82c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c485df1f002a</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Antón Molleda]]></dc:creator>
            <pubDate>Wed, 08 Nov 2017 18:02:41 GMT</pubDate>
            <atom:updated>2018-10-03T18:30:45.770Z</atom:updated>
            <content:encoded><![CDATA[<h3>Linting the web forward</h3><p><strong>Update:</strong> sonarwhal has been renamed to webhint. Check <a href="https://medium.com/webhint/webhint-a-hinting-engine-for-the-web-ef0d3fa32ea9">the announcement</a> to know what else has change.</p><p>We are excited to announce a new open source project we&#39;ve been working for the last few months: <a href="https://sonarwhal.com/scanner"><strong>sonarwhal</strong>, a new linting tool and site scanner for the modern web</a>.</p><p>sonarwhal brings many improvements compared to previous scanners: execution of website code instead of static analysis, a more flexible and modernized set of rules, parallel test execution, integration with other services, a completely open source code base from day one, and more. Additionally, <a href="https://sonarwhal.com/docs/user-guide/">sonarwhal can also be used as a command line tool</a> built on top of node that you can integrate directly into your local web development workflows.</p><p>Web development is more than HTML, JavaScript, and CSS: developers are expected to have a grasp of accessibility, performance, security, emerging standards, and more, all while refreshing this knowledge every few months as the web evolves.</p><h3>Linting the web forward</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*AFITI8T4Rjp8sLoznWIRtQ.png" /><figcaption>Web development can be complex.</figcaption></figure><p>Simply put, the web is complex, and we want sonarwhal to make it a bit easier for you to write great websites. To make sure that sonarwhal can be helpful not only now, but in the future, we started with a set of guiding principles before we wrote a single line of code.</p><h3>Put the user at the center</h3><p>Rather than just telling developers what was wrong, sonarwhal had to also say why. It is important to know the reason for an issue so developers can decide if that really applies to their work. The requirements from website to website can change a lot―for example, an intranet website and an online shopping experience will have vastly different needs. Therefore, sonarwhal should also be easy to use, configure, and expand.</p><h3>Build for the community’s best interests</h3><p>The web belongs to everyone, and this project should too. Everything had to be open sourced since the beginning, but that wasn’t enough―we wanted to go even further and make it easier for the web community to get involved, and remove any possible doubt that this project has the community’s best interest in mind. For that reason, we decided to <a href="https://js.foundation/announcements/2017/06/22/sonar-js-foundation-welcomes-newest-project">donate the project to the JS Foundation early during the summer</a>.</p><h3>Collaborate with existing tools and services</h3><p>sonarwhal should avoid reinventing the wheel, instead leveraging and integrating existing tools and services that help developers build for the web. We are happy to say that sonarwhal now integrates with <a href="https://www.deque.com/blog/microsoft-selects-deque-axe-sonar-project/">aXe Core</a>, <a href="https://twitter.com/AMPhtml/status/919990024770170880">AMP validator</a>, <a href="https://snyk.io/blog/announcing-snyk-in-sonar/">snyk.io</a>, SSL Labs, and <a href="https://cloudinary.com/blog/cloudinary_offers_support_for_sonar/">Cloudinary</a>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FZLEyWCtcEAQ%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DZLEyWCtcEAQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FZLEyWCtcEAQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e516a6c5175d1c8061b7d208426f453b/href">https://medium.com/media/e516a6c5175d1c8061b7d208426f453b/href</a></iframe><h3>sonarwhal today, and what’s next</h3><p>We’ve come a long way since we wrote down those principles a few months ago: sonarwhal is now available as an open sourced command line utility, built on node, that you can <a href="https://npmjs.com/packages/sonarwhal">install via npm</a>. Additionally, it has an <a href="https://github.com/sonarwhal/online-service/">open-source</a> <a href="https://sonarwhal.com/scanner">online service</a>, deployed on top of Azure, using docker containers, that can scan any publicly available website. sonarwhal’s rules are backed by a collection of <a href="https://sonarwhal.com/docs/user-guide/rules/">best practices for the web</a>, with links to more detailed documentation that keeps growing with each new rule.</p><p>But this is just the beginning. We’re hard at work on a backlog of exciting features for future releases, such as:</p><ul><li><strong>A plug-in for Visual Studio Code</strong>: We want sonarwhal to help you write better websites, and what better moment than when you are in your editor.</li><li><strong>Configuration options for the online service</strong>: As we fine tune the infrastructure, the rule configuration for our scanner is locked, but we look forward to adding customization options here in the near future.</li><li><strong>New rules</strong> for a variety of areas like <a href="https://github.com/sonarwhal/sonar/labels/rule-category%3Aperformance">performance</a>, <a href="https://github.com/sonarwhal/sonar/labels/rule-category%3Aa11y">accessibility</a>, <a href="https://github.com/sonarwhal/sonar/labels/rule-category%3Asecurity">security</a>, <a href="https://github.com/sonarwhal/sonar/labels/rule-category%3Apwa">Progressive Web Apps</a>, and more.</li></ul><p>If you are excited about sonar, making a better web, and want to contribute, we have a <a href="https://github.com/sonarwhal/sonar/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22">few issues where you might be able to help</a>. Also, don’t forget to check the rest of the <a href="https://github.com/sonarwhal">sonarwhal GitHub organization</a>. PRs are always welcome and appreciated!</p><p>Take a few moments to try the <a href="https://sonarwhal.com/scanner">sonarwhal scanner</a> and the <a href="https://github.com/sonarwhal/sonar">CLI</a>, and let us know what you think at <a href="https://twitter.com/narwhalnellie">@web</a>hintio on Twitter or in the comments below!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c485df1f002a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/webhint/sonarwhal-linting-the-web-forward-c485df1f002a">sonarwhal: Linting the web forward</a> was originally published in <a href="https://medium.com/webhint">webhint</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enabling brotli in your Azure CDN]]></title>
            <link>https://medium.com/web-on-the-edge/enabling-brotli-in-your-azure-cdn-74c4d23a88be?source=rss-53287ad0d82c------2</link>
            <guid isPermaLink="false">https://medium.com/p/74c4d23a88be</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[compression]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[cdn]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Antón Molleda]]></dc:creator>
            <pubDate>Tue, 04 Apr 2017 00:02:37 GMT</pubDate>
            <atom:updated>2017-04-07T17:20:22.765Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>TL;DR:</strong> If you are using Azure’s CDN and want to enable brotli you will need to create some custom rules that you can see at the end of the article.</p><p><a href="https://medium.com/u/2508e4c7a8ec">Addy Osmani</a> shared this <a href="https://twitter.com/addyosmani/status/848248181863231488">tweet about CDNs that don’t support brotli</a> and I though it could be interesting to tell how we enabled it on Azure CDN for <a href="https://developer.microsoftedge.com/">https://dev.microsoftedge.com</a>.</p><p>The first step is to compress the assets and configure IIS. This is relatively easy and you can <a href="https://medium.com/web-on-the-edge/building-in-10k-compilation-optimization-and-compression-506ab46f911b">learn how we did it here</a>. The difficult part was getting the CDN to deliver the brotli-fy assets. Azure has Akamai and Verizon as CDN providers. Our website uses the Verizon one.</p><p>Initially, we tried using the “vary”: “accept-encoding” header, as <a href="https://www.fastly.com/blog/best-practices-for-using-the-vary-header">fastly</a> and <a href="https://blog.stackpath.com/accept-encoding-vary-important">stackpath</a> (among others) recommend when dealing with CDNs and compressed assets. Unfortunately that didn’t work. Long story short (because it took longer that I wanted to), the solution was to create a couple of custom rules in their rule engine (available to anyone).</p><p>First you need to go to the external CDN management portal. You get access to it by clicking on “Manage” in your Azure CDN’s profile page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4a_Lc_Xa_IHjZLOLyV_7Tg.png" /><figcaption>Example of Azure CDN profile page and where the “Manage” button is</figcaption></figure><p>In the new page you need to go to “Rules Engine”, under “HTTP LARGE”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*6zbAKP0D8tyVFX05qpJvlg.png" /><figcaption>How to get to “Rules Engine” in the Azure CDN Management page</figcaption></figure><p>Once there, you are ready to create the rules. In our case we are also using zopfli for better gzip compression, so we end up creating two new rules. The trick is to create a different “Cache-Key” for gzip and brotli assets so the CDN stores the files separately. The anatomy of the brotli rule is as follows:</p><ul><li>Detect if the request is for a file that is going to be compressed in the origin. In our case: css, html, ico, js, map, svg, txt, xml, webmanifest.</li><li>See if the browser supports brotli via the “Accept-Encoding” header via a regular expression.</li><li>If the above conditions are true, create a new “Cache-Key” (<em>name_of_the_file_br</em>) for the response of the origin and modify the “Accept-Encoding” header of the client to be just “br”.</li></ul><p>We do exactly the same for gzip and we make sure that brotli has a higher priority by placing it at the bottom of the list of rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r5UVZmx7iq9ceDnST9T73g.png" /><figcaption>Zopfli rule</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-R9tWjRUovlabCmySVUwvA.png" /><figcaption>Brotli rule</figcaption></figure><p>After doing this, you just have to wait until the changes propagate and you should have brotli enabled in your site!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74c4d23a88be" width="1" height="1" alt=""><hr><p><a href="https://medium.com/web-on-the-edge/enabling-brotli-in-your-azure-cdn-74c4d23a88be">Enabling brotli in your Azure CDN</a> was originally published in <a href="https://medium.com/web-on-the-edge">Web Dev @ Microsoft</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>