<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Technical Manual</title><link>https://manual.toulan.fun/en/</link><description>Technical manuals and development guides</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Wed, 10 Sep 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://manual.toulan.fun/en/index.xml" rel="self" type="application/rss+xml"/><item><title>A Comprehensive Guide to the HTML &lt;a&gt; Tag's rel Attribute: Safety, Privacy, and SEO Best Practices</title><link>https://manual.toulan.fun/en/html-a-rel-attribute-guide/</link><pubDate>Wed, 10 Sep 2025 00:00:00 +0000</pubDate><author><name>HenryZ</name><uri>https://nodewee.github.io/</uri><email>nodewee@gmail.com</email></author><guid>https://manual.toulan.fun/en/html-a-rel-attribute-guide/</guid><description><![CDATA[<p>Hi, I&rsquo;m HenryZ.<br>
This article discusses a pitfall that every front-end developer has encountered but often glosses over: the <code>rel</code> attribute of the <code>&lt;a&gt;</code> tag.<br>
After reading this, you&rsquo;ll be able to tell yourself: &ldquo;From now on, whenever I use <code>target=&quot;_blank&quot;</code>, I&rsquo;ll first write <code>noopener</code> and then add others as needed.&rdquo;</p>
<h2 id="1-understand-two-things-first" class="headerLink">
    <a href="#1-understand-two-things-first" class="header-mark"></a>1. Understand Two Things First</h2><table>
  <thead>
      <tr>
          <th>Question</th>
          <th>One-sentence Answer</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>What is <code>rel</code> for?</td>
          <td>It tells the browser &ldquo;what my relationship with that link is&rdquo; and decides whether to hand over information from the previous page.</td>
      </tr>
      <tr>
          <td>Why is it always used with <code>target=&quot;_blank&quot;</code>?</td>
          <td>A new tab will get the <code>window.opener</code> pointer, which can tamper with the source page in reverse—this is called <strong>reverse tabnabbing</strong>.</td>
      </tr>
  </tbody>
</table>
<h2 id="2-the-safety-duo-noopener--noreferrer" class="headerLink">
    <a href="#2-the-safety-duo-noopener--noreferrer" class="header-mark"></a>2. The Safety Duo: noopener / noreferrer</h2><table>
  <thead>
      <tr>
          <th>Attribute</th>
          <th>What It Does</th>
          <th>Additional Effect</th>
          <th>Recommended Scenario</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>noopener</code></td>
          <td>Cuts off <code>window.opener</code></td>
          <td>None</td>
          <td>Add to all <code>target=&quot;_blank&quot;</code> links to ensure safety first</td>
      </tr>
      <tr>
          <td><code>noreferrer</code></td>
          <td>Does not send the <code>Referer</code> request header</td>
          <td>Modern browsers also cut off <code>window.opener</code></td>
          <td>Use when you don&rsquo;t want the target site to know where you&rsquo;re coming from</td>
      </tr>
  </tbody>
</table>
<blockquote>
  <p><strong>What does &ldquo;cutting off <code>window.opener</code>&rdquo; mean?</strong><br>
By default, the <code>window.opener</code> in a new tab points to the page that opened it.<br>
With this &ldquo;key to go back,&rdquo; the new page can:</p>]]></description></item><item><title>CSS :has() Parent Selector and Relational Queries</title><link>https://manual.toulan.fun/en/css-has-parent-selector/</link><pubDate>Fri, 24 Nov 2023 00:00:00 +0000</pubDate><author><name>HenryZ</name><uri>https://nodewee.github.io/</uri><email>nodewee@gmail.com</email></author><guid>https://manual.toulan.fun/en/css-has-parent-selector/</guid><description><![CDATA[<p>Hi, I&rsquo;m HenryZ 👋.</p>
<p>In frontend development, we often encounter these requirements:</p>
<ul>
<li><strong>Parent element styles depending on child element states</strong> — Such as navigation bars where parent <code>&lt;li&gt;</code> needs to highlight based on whether child <code>&lt;a&gt;</code> has <code>.active</code>.</li>
<li><strong>Layout changes with content</strong> — For example, CSS Grid containers switching column numbers when child elements exceed a threshold.</li>
<li><strong>Interaction-driven parent styles</strong> — During form validation, parent <code>&lt;form&gt;</code> changes state based on the validity of internal <code>&lt;input&gt;</code> elements.</li>
</ul>
<p>Previously, these scenarios could only rely on <strong>JavaScript</strong>: traversing the DOM to query child elements, then manually adding classes to parent elements. This not only increased code volume but also scattered logic between CSS and JS, reducing maintainability.</p>]]></description></item><item><title>How to Search Articles on This Site</title><link>https://manual.toulan.fun/en/manual-how-to-search/</link><pubDate>Thu, 07 Jul 2022 00:00:00 +0000</pubDate><author><name>HenryZ</name><uri>https://nodewee.github.io/</uri><email>nodewee@gmail.com</email></author><guid>https://manual.toulan.fun/en/manual-how-to-search/</guid><description><![CDATA[<p>🔍 Search Box Shortcut: <code>Ctrl</code> + <code>K</code></p>
<p>Use Unix-like search command syntax.<br>
For example, to search for articles containing both <code>hello</code> and <code>world</code>: <code>'hello 'world</code></p>
<p>Syntax Details:</p>
<ul>
<li>Space acts as a <strong>logical AND</strong> operator,</li>
<li>Vertical bar (<code>|</code>) acts as a <strong>logical OR</strong> operator.<br>
To search for whitespace (escape whitespace), use double quotes. Example: <code>'&quot;hello world&quot;</code>, to search for articles containing &ldquo;hello world&rdquo;.</li>
</ul>
<table>
  <thead>
      <tr>
          <th>Syntax Example</th>
          <th>Match Type</th>
          <th>Description</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><code>javascript</code></td>
          <td>Fuzzy match</td>
          <td>Items that fuzzy match <code>javascript</code></td>
      </tr>
      <tr>
          <td><code>=scheme</code></td>
          <td>Exact match</td>
          <td>Items that are exactly <code>scheme</code></td>
      </tr>
      <tr>
          <td><code>'python</code></td>
          <td>Contains</td>
          <td>Items that include <code>python</code></td>
      </tr>
      <tr>
          <td><code>!ruby</code></td>
          <td>Does not contain</td>
          <td>Items that do not include <code>ruby</code></td>
      </tr>
      <tr>
          <td><code>^java</code></td>
          <td>Starts with specified chars</td>
          <td>Content that starts with <code>java</code></td>
      </tr>
      <tr>
          <td><code>!^erlang</code></td>
          <td>Does not start with</td>
          <td>Content that does not start with <code>erlang</code></td>
      </tr>
      <tr>
          <td><code>.js$</code></td>
          <td>Ends with</td>
          <td>Content that ends with <code>.js</code></td>
      </tr>
      <tr>
          <td><code>!.go$</code></td>
          <td>Does not end with</td>
          <td>Content that does not end with <code>.go</code></td>
      </tr>
  </tbody>
</table>
<p><em>Written by HenryZ</em></p>]]></description></item></channel></rss>