<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Cdn on Commentary of Takao</title><link>https://takao.blog/es/tags/cdn/</link><description>Recent content in Cdn on Commentary of Takao</description><generator>Hugo -- gohugo.io</generator><language>es</language><copyright>Commentary of Takao</copyright><lastBuildDate>Sun, 12 Jul 2026 04:12:51 +0900</lastBuildDate><atom:link href="https://takao.blog/es/tags/cdn/index.xml" rel="self" type="application/rss+xml"/><item><title>Estrategias de caché en CDN</title><link>https://takao.blog/es/web/cdn-caching-strategies/</link><pubDate>Mon, 30 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/es/web/cdn-caching-strategies/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/cdn-caching-strategies-es.png" alt="Featured image of post Estrategias de caché en CDN" /&gt;&lt;p&gt;Las CDN almacenan contenido en servidores edge cercanos al usuario. Las estrategias de caché determinan qué, cuándo y cómo se almacena.&lt;/p&gt;
&lt;h2 id="cache-control"&gt;Cache-Control
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;public, max-age=31536000, immutable&lt;/code&gt; para recursos versionados. &lt;code&gt;no-cache&lt;/code&gt; para validar con el origen. &lt;code&gt;no-store&lt;/code&gt; para datos sensibles.&lt;/p&gt;
&lt;h2 id="invalidación-de-caché"&gt;Invalidación de caché
&lt;/h2&gt;&lt;p&gt;Por URL (nuevo hash en nombre de archivo). Por purga (API de CDN). Por TTL (cacheo por tiempo). Por tags (purga por etiqueta).&lt;/p&gt;
&lt;h2 id="estrategias-híbridas"&gt;Estrategias híbridas
&lt;/h2&gt;&lt;p&gt;Assets estáticos: caché larga con versionado. HTML: TTL corto o sin caché. APIs: caché por URL con stale-while-revalidate.&lt;/p&gt;</description></item><item><title>Subresource Integrity (SRI): Garantizando integridad de recursos</title><link>https://takao.blog/es/web/subresource-integrity/</link><pubDate>Fri, 20 Dec 2024 00:00:00 +0900</pubDate><guid>https://takao.blog/es/web/subresource-integrity/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/subresource-integrity-es.png" alt="Featured image of post Subresource Integrity (SRI): Garantizando integridad de recursos" /&gt;&lt;p&gt;Subresource Integrity (SRI) permite verificar que un archivo cargado desde un CDN no ha sido manipulado, comparando su hash criptográfico.&lt;/p&gt;
&lt;h2 id="cómo-funciona"&gt;Cómo funciona
&lt;/h2&gt;&lt;p&gt;El atributo &lt;code&gt;integrity&lt;/code&gt; contiene un hash (SHA-256, SHA-384, SHA-512) del contenido esperado. El navegador calcula el hash y lo compara. Si no coincide, bloquea el recurso.&lt;/p&gt;
&lt;h2 id="ejemplo"&gt;Ejemplo
&lt;/h2&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;&lt;span style="color:#f92672"&gt;script&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;src&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;https://cdn.example.com/lib.js&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;integrity&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;sha384-...&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;crossorigin&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;anonymous&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;El crossorigin es obligatorio para recursos CORS.&lt;/p&gt;
&lt;h2 id="generación-de-hashes"&gt;Generación de hashes
&lt;/h2&gt;&lt;p&gt;&lt;code&gt;openssl dgst -sha384 -binary archivo.js | openssl base64 -A&lt;/code&gt;. O usando herramientas online de SRI. Automatiza en el build process.&lt;/p&gt;</description></item><item><title>Cloudflare Pages: Despliegue de sitios estáticos</title><link>https://takao.blog/es/web/cloudflare-pages/</link><pubDate>Tue, 28 Nov 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/es/web/cloudflare-pages/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-cloudflare-pages-es.png" alt="Featured image of post Cloudflare Pages: Despliegue de sitios estáticos" /&gt;&lt;p&gt;Cloudflare Pages aloja sitios estáticos y aplicaciones Jamstack con integración directa desde repositorios de Git.&lt;/p&gt;
&lt;h2 id="configuración-inicial"&gt;Configuración inicial
&lt;/h2&gt;&lt;p&gt;Conecta tu repositorio (GitHub/GitLab). Selecciona la rama, framework (Hugo, Next, React) y comandos de build. Despliegue automático en cada push.&lt;/p&gt;
&lt;h2 id="funciones-serverless"&gt;Funciones serverless
&lt;/h2&gt;&lt;p&gt;Cloudflare Functions ejecutan código en el edge. Basadas en Workers. Formularios, autenticación, APIs ligeras.&lt;/p&gt;
&lt;h2 id="ramas-y-previsualizaciones"&gt;Ramas y previsualizaciones
&lt;/h2&gt;&lt;p&gt;Deploy preview por PR. Ramas de producción y staging. URLs únicas por preview. Ideal para revisión de cambios.&lt;/p&gt;</description></item><item><title>Guía de Cloudflare para desarrolladores web</title><link>https://takao.blog/es/web/cloudflare/</link><pubDate>Tue, 28 Nov 2023 00:00:00 +0900</pubDate><guid>https://takao.blog/es/web/cloudflare/</guid><description>&lt;img src="https://takao.blog/img/thumbnail/how-to-cloudflare-es.png" alt="Featured image of post Guía de Cloudflare para desarrolladores web" /&gt;&lt;p&gt;Cloudflare ofrece CDN, seguridad, DNS y optimización de rendimiento para sitios web. Configurarlo correctamente mejora velocidad y protección.&lt;/p&gt;
&lt;h2 id="configuración-dns"&gt;Configuración DNS
&lt;/h2&gt;&lt;p&gt;Añade tu dominio, configura registros DNS (A, CNAME, MX). Activa el proxy naranja (proxy) para proteger IPs de origen y activar optimizaciones.&lt;/p&gt;
&lt;h2 id="ssltls"&gt;SSL/TLS
&lt;/h2&gt;&lt;p&gt;Modos: Off, Flexible, Full, Full (strict). Recomendado: Full (strict) con certificado de origen. HSTS para forzar HTTPS.&lt;/p&gt;
&lt;h2 id="reglas-de-page-rules-y-waf"&gt;Reglas de Page Rules y WAF
&lt;/h2&gt;&lt;p&gt;Reglas de caché, redirecciones, seguridad por ruta. Firewall con reglas custom, rate limiting y protección DDoS.&lt;/p&gt;</description></item></channel></rss>