We have introduced a new CDN infrastructure for Tiny Cloud, and there are a few things you can do to make sure you're taking full advantage of the performance benefits.
For those who are interested in the technical details, in a related post, we explain some of the key factors influencing the move as well as an overview of our solution (codename: Dispenser).
In a nutshell, Dispenser loves caching, but if you make it difficult for Dispenser to cache when using TinyMCE on the cloud, then you'll get worse performance.
So here are three tips to help you make the most of it.
1. Avoid using cache-busting queries
Cache-busting query parameters (like
?_cacheOverride=1572495487539) are one example of how you can make it difficult for Dispenser to cache. While Dispenser is able to remove unknown query parameters when it performs its usual HTTP redirects, adding these ever-changing query parameters will add additional latency, as Dispenser is unable to reuse redirect responses that it has previously cached.
2. Set the referrer policy to "origin"
Your use of referrer policies heavily influences caching. Every request's Referer header is part of the edge cache key. That works fine out-of-the-box if you're only using TinyMCE on one page on your site. But if you use TinyMCE on multiple pages, then you'd really like that Referer header to be the same between pages. Fortunately, there's a way to do that, and it's why the script tag you'll find in the Tiny docs includes
For browsers that support it, setting the referrer policy to "origin" means the Referer header only shows the protocol and domain of the site you're using (just like the "Origin" header does for AJAX requests). Tiny doesn't need or want the path or query parameters for the page you're using the editor from. By not sending them to us, you're both improving your users' privacy and helping keep the edge cache key stable across your site. Your users will see more edge cache hits and faster editor loads as a result, and Tiny saves a bit of bandwidth and CPU.
3. Set a referrer policy
While not strictly a tip for improving performance, we thought it was worth calling this one out here too.
If you're a big user of 3rd-party CDNs, Tiny encourages you to always consider the referrer information you're comfortable sending when you use them. While it may not always be possible to set a site-wide referrer policy, setting one for your script tags (like the TinyMCE script tag does in our examples) is still a good way to improve your users' privacy.
While we're on the topic of making the most of TinyMCE, stay up to date with our range of premium plugins. It might also be worth considering taking advantage of our developer bundle or pro bundle, if you're not already.