14-day Cloud trial
Start today. For free.

One editor. 50+ features. Zero constraints. After your trial, retain the advanced features.

Try Professional Plan for FREE
PricingContact Us
Log InGet Started Free

3 tips to improve TinyMCE performance in the cloud

November 18th, 2019

2 min read

Abstract illustration of a person standing at production line by Sanni Sahil

Written by

Tim Dettrick

Artwork by

Sanni Sahil

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 referrerpolicy="origin"

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.

What's next?

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.

TinyMCETiny Cloud
byTim Dettrick

Tim is a senior engineer developing and improving Tiny’s cloud offerings. His days involve using Haskell, containerization, and cloud infrastructure to tackle the challenge of building resilient systems that cope with how inconveniently large the Earth actually is.

Related Articles

  • Developer InsightsJun 3rd, 2024

    TinyMCE Sponsors and Presents at Frontend Nation Online Event

Join 100,000+ developers who get regular tips & updates from the Tiny team.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Tiny logo

Stay Connected

SOC2 compliance badge


© Copyright 2024 Tiny Technologies Inc.

TinyMCE® and Tiny® are registered trademarks of Tiny Technologies, Inc.