A Signed-In Owner and a Visitor Get Different Caching

Caching is what makes a website fast: a page is built once and the built copy is handed to everybody who asks for it, instead of being assembled from scratch every time. The interesting part is deciding who gets a stored copy and who gets a fresh one.

The problem with one rule for everybody

An owner editing their own site and a visitor reading it want opposite things.

You want to see your change immediately. If your edit sat behind a cache you would have no idea whether it saved, so you would edit it again, which is worse than slow.

A visitor wants the fastest possible page and does not care in the slightest whether it was built a second ago or an hour ago. They are reading it once.

Serve everybody a fresh page and the site is slow for the people it exists for. Serve everybody a stored one and editing becomes guesswork.

Caching by who is asking

So the decision is made per requester rather than per site. Somebody signed in as the owner gets a fresh page every time, so what you see is always what you just saved. Everybody else gets the stored copy, which is fast.

The practical consequence is the one worth knowing: your own editing does not change how fast your site is for anybody else. An actor who logs in daily and one who has not logged in for a year have equally fast sites, because how often you edit is not an input into what a visitor is served.

What this means for you

Very little, which is the point. Edit, save, look, and what you see is real. Nothing needs clearing and there is no button to press.

The one thing worth remembering is that if you want to see your site the way a visitor sees it, including its real speed, open it in a private browser window where you are not signed in. That is also the right way to check anything about how your site appears publicly.

Related: faster page loads and declaring image dimensions. Caching applies the same way on your own domain.

Create a free actor website.


Tomasz Mieczkowski

About Tomasz Mieczkowski

Tomasz Mieczkowski is the co-founder of IADB.com and all of the related websites for film and tv industry professionals.

Connect with Tomasz: