Cloudflare Workers edge in Stockholm

Cloudflare Workers for Stockholm SaaS and product companies: a fast marketing site in front of WordPress, pricing and docs routing, subscription-safe caching, Swedish cookie rules. Delivered remotely from Gdynia.

Cloudflare Workers edge

My place in the WordPress community

  • I have had a wordpress.org account since 2006.
  • I contributed to WordPress core for versions 7.0 and 7.1.
  • I maintain 30 plugins on wordpress.org.
  • I organise and speak at WordCamps.
  • I have attended every WordCamp Europe from 2017 to 2026.
  • Local WordPress meetup: WordPress Stockholm

My WordPress.org profile

What does an edge layer do for a product company’s website?

A typical Stockholm product company has three things that look like one website to the visitor. There is a marketing site, usually WordPress, where the team publishes features, case material and pricing. There is documentation, often a static site or a hosted help centre. And there is the application itself, which lives on its own servers and has nothing to do with a CMS.

Each of the three has a different failure mode. The marketing site gets the traffic spikes: a launch post, a mention on a news site, a paid campaign. The documentation is read by engineers who expect it to load at once. The application must never be slowed by a marketing event. When all three sit on one hostname behind a single load balancer, a surge on the first can reach the third.

A Cloudflare Worker is code that runs on Cloudflare’s network near the visitor. It starts in a V8 isolate and scales without a server of your own. In front of a product company’s domain it can do two things well: serve anonymous marketing pages from the edge so WordPress is not asked to render them again, and route paths to different origins so the three systems stay independent.

My name is Mariusz Szatkowski and WPPoland is my one-person company in Gdynia, active since 2006. I work for Stockholm clients remotely and in writing. Stockholm and Gdynia share the same time zone, so there is no schedule shifting. Scope, schedule and contract go by email, and you review the work on a staging environment. I do not offer on-site meetings. The general description is on the Cloudflare edge development page; this page covers what it means for a Stockholm company.

How does path routing keep WordPress and the app apart?

Path routing is the least glamorous and most useful thing a Worker does for a product company. The rule is simple: the Worker looks at the path and decides which system answers.

A typical map looks like this:

  • the front page, features, pricing and blog go to WordPress,
  • the documentation path goes to the static documentation host,
  • the application path and the API go to the application servers,
  • everything else falls back to WordPress, which serves the not-found page.

The visitor sees one domain, and search engines see one site, which matters for authority and for sitelinks. The teams behind each system deploy on their own schedule. The Worker configuration is a small file under version control, reviewed like code.

There are traps. Cookies set by the application must not be sent to the marketing origin and the other way round, because that leaks identifiers and defeats caching. Redirects between old and new paths belong in one table, not in three systems that each remember a different history. Relative links in the documentation must survive being served from a path instead of a subdomain. I test each of these on a staging copy, with the real hostnames mapped, before anything changes in production.

Moving documentation from a subdomain to a path is also a search decision. It concentrates authority on one hostname, but it needs permanent redirects from the old address and a clean sitemap. I plan that migration step by step, and I report the ranking and traffic figures before and after from your own Search Console data, so the effect can be judged, not assumed.

Which pages can be cached, and which never?

For a subscription business the rule is short. Anything that depends on who the visitor is stays at the origin. Anything the same for every anonymous visitor can be served from the edge.

Cached for anonymous visitors: front page, feature pages, pricing, blog, case material, legal pages and the documentation.

Never cached: login, sign-up, trial start, checkout, billing, account settings, invoices, and any route that reads or sets a session cookie.

Pricing deserves attention because it looks static and sometimes is not. If the page shows a price in the visitor’s currency, or a discount for a campaign code in the address, the cache key must include whatever changes the content. Otherwise a visitor in one market sees another market’s price, and that is a business error that no one notices until a customer writes in. I define the cache key explicitly for each route and test it by requesting the page with different currencies, countries and campaign parameters.

Campaign parameters are a second trap. Paid campaigns add tracking parameters to addresses, and if each variant is cached separately the hit rate collapses. A Worker can strip parameters that do not change the content from the cache key while leaving them in the address for analytics. Swedish teams measure campaigns closely, so I check that the attribution data still arrives after the change, by comparing analytics before and after on a staging copy.

For shops that sell products or recurring plans through WooCommerce, the same split applies, and the WooCommerce developer in Stockholm page describes the commerce side. For work on the WordPress foundation itself, see the WordPress developer in Stockholm page.

Payments in Sweden: Swish, cards and invoices

Payment habits shape checkout design. In Sweden, consumers expect Swish, cards and invoice or instalment options from providers such as Klarna, and a business customer expects to pay by invoice. Each of these means a handoff to a provider and a return to your site with a result.

The rule for an edge layer is that payment return and callback routes are never cached and never rewritten, and are never challenged or rate limited in a way that could drop a legitimate callback. A bot filter that blocks a payment provider’s server is a silent revenue leak: the customer pays, the order never confirms. I allow the provider’s callbacks explicitly and test them on staging with the provider’s test mode.

I do not choose payment providers for you, and I do not advise on their contracts. My part is making sure that whatever you use survives a cache and a filter.

Sweden implements the ePrivacy rules in the Electronic Communications Act of 2022, number 2022:482. Chapter 9, section 28 says that information may be stored on or read from a user’s device only if the user is informed about the purpose and consents, with exceptions for what is needed to transmit a message or to provide a service the user has explicitly asked for. The supervisory authority for data protection is IMY, the Authority for Privacy Protection.

For an edge project this has two consequences. First, a Worker that sets its own cookie, for instance to remember a language choice or an experiment variant, must be judged against the same rule as any analytics script. A cookie needed to deliver what the visitor asked for may be exempt. A cookie that only helps you measure is not. Second, a consent banner does not guarantee that scripts wait for consent. I open the page in a clean browser, decline consent and check the network log for requests to analytics and advertising domains. A plugin setting can say one thing while the page does another.

The General Data Protection Regulation applies to the personal data itself. A company that uses Cloudflare treats it as a processor, and Article 28 requires a contract covering the subject matter and duration of the processing. Cloudflare offers a data processing agreement and publishes its sub-processors, which your legal adviser should review. I design Workers to touch as little personal data as possible and write a short data flow description for your records of processing. Transfers outside the EEA fall under Chapter V, starting with Article 44, and whether a given setup satisfies it is a question for your adviser.

Can an edge layer support experiments and personalisation?

Product companies like to test headlines, pricing layouts and calls to action. A Worker can assign a visitor to a variant and serve different HTML without a flicker, because the choice happens before the page is sent. This is faster than client-side scripts that swap content after load, and it avoids the layout shift that comes with them.

The costs are real. Variants multiply cache entries, so the number of simultaneous experiments should be small. The assignment needs a cookie, which brings the consent question from the previous section. And an experiment must never change what search engines see in a misleading way: crawlers should receive the control version, and every variant keeps the same canonical address.

I build this when a team has an actual testing practice and the traffic to reach a conclusion. A site with a few thousand monthly visits cannot detect a modest difference between two headlines, and a tool that cannot produce a conclusion is overhead. I say so during the audit and suggest measuring first.

How do I handle bots, scrapers and AI crawlers?

Pricing pages and documentation attract automated traffic. Competitors collect pricing, scrapers copy documentation, and crawlers gather content for model training. The cost is load, distorted analytics and sometimes real security risk on login routes.

At the edge I classify requests before they reach the origin. Typical measures are rate limiting by pattern, challenges for suspicious traffic and explicit rules for the crawlers you want, such as search engines. Whether to admit AI crawlers is a business decision, not a technical default. Some companies want their documentation to be cited in AI answers and some do not. I implement your decision, per path if needed, and I keep a log so you can see what the rule actually did.

I do not promise that no bot gets through. Filtering reduces automated traffic, and I measure before and after so the effect can be judged.

When is a Workers project the wrong call?

Take a young company with a one-page marketing site, a hosted documentation tool and a free tier that drives sign-ups. If traffic is steady and the marketing site changes weekly, an edge layer adds a moving part without removing a problem. A cache plugin, optimised images and a tidy theme deliver most of the gain, and the budget is better spent on the product.

A Worker is also software that needs maintenance. Several takeover projects I see begin as someone else’s orphaned Worker, undocumented and sitting in the request path of a business that has forgotten it. If a project cannot fund its upkeep, the responsible answer is not to build it.

What justifies the build is usually one of two conditions: bursts from launches, press or paid campaigns, or several systems that must share one domain without sharing failures. Both can be checked before any commitment. If neither is present, the audit will say so.

If the real issue is a heavy front end, a rebuild may be the fix. For that path, see my Astro developer in Stockholm service. I recommend sequencing: edge layer first, measure, then decide on a rebuild.

Is there a WordPress community in Stockholm?

Yes. A WordPress Stockholm group has a page on Meetup.com at WordPress Stockholm on Meetup, which I checked while preparing this page. I have not attended it, so I cannot describe its events. I organise the WordUp Trojmiasto meetup in Gdynia, a role I have held since 2015, and I was among the organisers of the first bilingual WordCamp in Poland in 2025, listed on the WordCamp Gdynia 2025 organisers page.

What should you send in the first email?

  • the address of your marketing site, documentation and application, and who runs each,
  • a description of the biggest traffic events of the past year,
  • access to analytics or Search Console, and logs if you can export them,
  • the payment and invoicing providers in use,
  • the languages and markets you serve, including any price differences,
  • any contract or compliance requirement about where data may be processed,
  • the date by which something must work, and the reason for that date.

If a point is missing, I will write back what is missing and what it means for scope and schedule.

How do I work with Stockholm clients?

I work as a company, with a contract and an invoice. The process stays in writing:

  1. You send the first email with the points above.
  2. After I review your site and measurements, you receive a scope, a schedule and a contract.
  3. I build the pilot Worker on a staging environment, which you review and comment on in writing.
  4. After launch, documentation and access stay with you, and I compare the effect with the measurements taken at the start.

Quotes are individual and depend on the scope of the edge logic. After the pilot, every stage is a checkpoint at which you can stop, keep the gains and the documentation, and owe nothing further. For ongoing care there is WordPress maintenance and support in Stockholm. You can send the first email through the contact page.

See also in Sweden

Need this service: Cloudflare Workers edge in Stockholm?

Describe your project by e-mail. I reply within 24 hours.

Describe your project

Explore other WordPress services and knowledge base