<?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 AnyStack</title><link>https://anystack.xyz/tag/cdn/</link><description>Recent content in CDN on AnyStack</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 16 Aug 2018 15:43:46 +0000</lastBuildDate><atom:link href="https://anystack.xyz/tag/cdn/index.xml" rel="self" type="application/rss+xml"/><item><title>Optimize easily your WordPress images without any plugin</title><link>https://anystack.xyz/optimize-wordpress-images-without-plugin/</link><pubDate>Sun, 23 Oct 2016 05:52:28 +0000</pubDate><guid>https://anystack.xyz/optimize-wordpress-images-without-plugin/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/Optimize--2--min.png" alt="Featured image of post Optimize easily your WordPress images without any plugin" /&gt;&lt;p&gt;You want to improve your pagespeed score by optimizing your images in WordPress ? But you don&amp;rsquo;t want to pay a subscription for a plugin ? If you are using a VPS or a dedicated server, you don&amp;rsquo;t need any plugin to optimize all your images easily.&lt;/p&gt;&#10;&lt;p&gt;For that you can use this script :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For debian/Ubuntu&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;wget&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;qO&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;deb&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;bash&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#For Centos/RedHat&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;wget&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;qO&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;centos&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;bash&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to do the process manually&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Debian/Ubuntu&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;apt-get update &amp;amp;&amp;amp; apt-get install optipng jpegoptim -y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Centos&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yum update &amp;amp;&amp;amp; yum install optipng jpegoptim -y&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then you just have to go in your web directory and to run the following commands :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;*.&lt;/span&gt;&lt;span class="n"&gt;jp&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;xargs&lt;/span&gt; &lt;span class="n"&gt;jpegoptim&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m76&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;iname&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;*.png&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;print0&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;xargs&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;optipng&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;o7&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;preserve&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>HTTP2 &amp; Web Optimization - How to have a fast website in 2016</title><link>https://anystack.xyz/http2-web-optimization-fast-website-2016/</link><pubDate>Thu, 11 Aug 2016 06:48:00 +0000</pubDate><guid>https://anystack.xyz/http2-web-optimization-fast-website-2016/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/diagram-asynchronous-resource-loading.png" alt="Featured image of post HTTP2 &amp; Web Optimization - How to have a fast website in 2016" /&gt;&lt;p&gt;Few years ago, the HTTPs protocol was slower than the http, due the the initial handshake of any SSL transaction. But with the HTTP2, there are several improvements available and some rules have change when we talk about web optimization. Most of the PageSpeed tools will recommend you to use domain sharding or to combine your assets to have a website faster. But is it still true ?&lt;/p&gt;&#10;&lt;p&gt;The most important feature of the HTTP2 is the &lt;a href="https://http2.github.io/faq/#why-is-http2-multiplexed"&gt;multiplexing&lt;/a&gt;, it allow to download multiple files with an unique TCP connection when we have to open a new one for each file in HTTP1.1&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/http2-multiplexing-1.jpg"&gt;&lt;/p&gt;&#10;&lt;h2&gt;1) No more assets concatenation&lt;/h2&gt;&#10;&lt;p&gt;We used to combine as much as possible our assets with HTTP1.1, that&amp;rsquo;s not true with HTTP2 anymore. Because if it reduce the size of the requests done, it also make the rules for caching harder to define and could have  bad results if you don&amp;rsquo;t need a part of the assets on each page of your website&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/http-1-1-file-concatenation.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/http-2-file-concatenation-1.png"&gt;&lt;/p&gt;&#10;&lt;p&gt; &lt;/p&gt;&#10;&lt;p&gt; &lt;/p&gt;&#10;&lt;h2&gt;2) No more domain sharding&lt;/h2&gt;&#10;&lt;p&gt;It was already a &amp;ldquo;trick&amp;rdquo; but the domain sharding is not a part of the past. It was used to open more TCP connection than a browser was supposed to. But you will have a negative result by using it with HTTP2 because it will only require unnecessary DNS request and more if the connection is established under TLS.&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/domain-sharding-1-2.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;But there are also rules which are still Best Pratices to have a fast website&lt;/p&gt;&#10;&lt;ul&gt;&#10; &lt;li&gt;Reduce DNS lookup -&amp;gt; store all assets on the same domain or with a CDN&lt;/li&gt;&#10; &lt;li&gt;Browser Caching&lt;/li&gt;&#10; &lt;li&gt;Minimize HTTP Requests -&amp;gt; cookies and query strings&lt;/li&gt;&#10; &lt;li&gt;Minimize HTTP Response -&amp;gt; Minify your assets&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>How Cloudflare speed up and protect your website - Part 1.</title><link>https://anystack.xyz/cloudflare-speed-protect-website/</link><pubDate>Mon, 01 Aug 2016 18:57:00 +0000</pubDate><guid>https://anystack.xyz/cloudflare-speed-protect-website/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/network-map.png" alt="Featured image of post How Cloudflare speed up and protect your website - Part 1." /&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;You don't know what is Cloudflare ? &lt;span style="line-height: 1.5;"&gt;So let's see how cloudflare make your website loading faster, and why you should already use it for all your websites.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ol style="text-align: justify;"&gt;&#10; &lt;li&gt;&#10;&lt;h2&gt;&lt;span style="font-size: 18pt;"&gt;&lt;strong&gt;) Cloudflare DNS - Free &amp;amp; Fast&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p style="text-align: justify;"&gt;Cloudflare provide at first one of the best DNS hosting service available. And to make a website faster you can already start with using a fast DNS hosting.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;DNS Provider Speed Comparison by solvedns.com&lt;/strong&gt;&lt;/p&gt;&#10;![/images/2016/10/draw.jpg)&#10;&lt;p style="text-align: justify;"&gt;It's only few Milliseconds but as you can see, Cloudflare is faster than many other providers and most of them offer paid services only. So before paying few dollars for a Premium DNS package, you should try cloudflare. Another feature you will love, is a propagation time around 5 minutes when you edit a record on your DNS. So if you need to migrate your website soon, this is really a good reason to register now.&lt;/p&gt;&#10;&lt;h2 style="text-align: justify;"&gt;&lt;span style="font-size: 18pt;"&gt;&lt;strong&gt;2. ) Cloudflare - Reverse Proxy with caching &lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;&#10;&lt;p style="text-align: justify;"&gt;But cloudflare does not provide only DNS Hosting. It's also a complete solution to speed up and secure your website. For that when Cloudflare manage your DNS if you activate the optimization and security (orange cloud), instead of sending your server IP when a visitor make a DNS request, it will act as a proxy and all your visitors will view only the Cloudflare servers IP when they do a request.&lt;/p&gt;&#10;![/images/2016/10/overview.png)&#10;&lt;p style="text-align: justify;"&gt;And Cloudflare will not only act as a simple proxy, it will also cache all the static files and deliver them all around the World to your visitors from the nearest Cloudflare datacenter.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;The result is awesome because it will make your website faster as it will handle less requests, and it will also save a lot of bandwidth by limiting the number of file requests.&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/0ea0ab24-290b-4b40-b974-57b2499162cf.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;As you can see, with 80 000 visitors per month, it's more than 20GB of bandwidth saved and also more than 20GB of static assets which have been delivered faster.&lt;/p&gt;&#10;&lt;h2 style="text-align: justify;"&gt;&lt;strong&gt;&lt;span style="font-size: 18pt;"&gt;3) Cloudflare - Website Protection&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&#10;&lt;p style="text-align: justify;"&gt;By acting as a proxy Cloudflare also provide a complete security solution which include :&lt;/p&gt;&#10;&lt;ul style="text-align: justify;"&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;Browser integrity check&lt;/strong&gt; : Each visitor request is checked using the HTTP header and if a thread is found it can be challenged using a captcha or blocked.&lt;/li&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;Visitor reputation&lt;/strong&gt; : Cloudflare analyze daily thousands of IP, and if a visitor try several times to perform any form of hack, it will be marked as a potential thread for Cloudflare&lt;/li&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;Page rules : &lt;/strong&gt;You can use the page rules to allow or disallow access to a part of your website. For example with wordpress your can use a high level of secuirty onthe page  http://yourdomain.com/wp-login.php to protect your website.&lt;/li&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;DDoS protection&lt;/strong&gt; : As  your visitors have to use cloudflare servers to get access to your website,  they will never have access to your server IP and any attack attempt will simply be blocked by the Cloudflare servers. &#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/reflection-attack-2.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;But to protect totally your server, you have to be sure there is not any records which point directly to your server. The most common error will be to have a email server with a MX record pointing  on your server IP.  In this case, Cloudflare will not be able to protect your website because the attacker will send the traffic directly on your server IP, and will not have to use the Cloudflare proxy.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;span style="font-size: 18pt;"&gt;&lt;strong&gt;4) Cloudflare - Website Optimization&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;And if it wasn't enough, Cloudflare is also able to optimize your website. It can minify all your assets, including the html, reduce the number of connections, and with rocket loader it will make deliver your assets asynchronously. That mean instead of waiting for each file to be downloaded, with cloudflare your browser will download all the assets in the same time when you visit your website, and it will be up to 3x times faster.&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/optimization-asynchronous-loading.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;The last optimization tool available for free is Rocket Loader, currently in beta, it's a script used by cloudflare to deliver your assets, without blocking the page display. It use the asynchronous loading to load your javascript at the end of the page display and this way it will really improve your pagespeed score. But like any beta, it could create error with some javascript or break your website design by loading too late some assets.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;For this reason you have 2 mode to use Rocket loader :&lt;/p&gt;&#10;&lt;ul style="text-align: justify;"&gt;&#10; &lt;li&gt;Automatic : Rocket loader will optimize any javascript available on your website but you have the ability to forbid the optimization manually by adding  data-cfasync="false" before the script source.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;script type=&amp;#34;text/javascript&amp;#34; data-cfasync=&amp;#34;false&amp;#34; src=&amp;#34;/js/tether.min.js&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Manual : This time you will have to add &lt;strong&gt;data-cfasync=&amp;ldquo;true&amp;rdquo;&lt;/strong&gt; for each script you want to optimize with Rocket Loader&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;I will complete this article with the HTTP2 and Cloudflare in the next few days.&lt;/strong&gt;&lt;/p&gt;&#10;</description></item></channel></rss>