Web - James Montemagno https://montemagno.com/tag/web/ https://montemagno.com/content/images/2017/08/MonogramIcon_Orange_NoBuffer.png Web - James Montemagno https://montemagno.com/tag/web/ Hugo -- gohugo.io Wed, 25 Nov 2026 09:25:47 GMT 60 Adding WebMCP to a Static Hugo Site on GitHub Pages https://montemagno.com/adding-webmcp-to-a-static-hugo-site-on-github-pages/ https://montemagno.com/adding-webmcp-to-a-static-hugo-site-on-github-pages/ Sat, 21 Nov 2026 15:00:00 GMT

I saw Debbie O'Brien's post about adding WebMCP to her site and thought this could be pretty cool for my own website. She also shared a walkthrough on X, which is worth checking out.

My first question, though, was whether it would work on a static website. This site uses Hugo, and GitHub Pages serves the generated files. There isn't an application server sitting behind each page waiting to answer an agent's questions.

Turns out, we don't need one!

So I added WebMCP to montemagno.com, with six read-only tools backed by a Hugo-generated content catalog. GitHub Pages still serves static files. No new backend, hosted AI model, chatbot widget, or runtime dependency.

A compatible client can now use those tools to answer questions like:

  • Which of my apps support macOS?
  • What published posts do I have about GitHub Copilot?

Here is a real Copilot CLI run discovering the tools and making those queries through a loopback relay:

Copilot CLI discovers one source and six WebMCP tools through the loopback relay, completes two webmcp_call_tool calls, and shows macOS app results linking to Tiny Clips and Weigh.
A real Copilot CLI run through the loopback relay: discovery, successful calls, and linked app results. Captured with a local test configuration.

Let's walk through what the tools do, how Hugo prepares their data, how to try them in Edge or Chrome, and a prompt for adding WebMCP to your own site.

Before you try it: WebMCP is experimental. You'll need a browser exposing the native API through its testing feature or a valid origin trial, plus a compatible client. The setup below starts with Edge.

WebMCP runs in your browser tab

WebMCP is a proposed web standard for exposing structured tools from a page. Each tool describes its purpose, defines inputs with JSON Schema, and supplies an execute function. Our JavaScript knows which content source to query and returns structured results.

That is different from hosting a conventional MCP server. Chrome's comparison explains the distinction: MCP connects clients to external systems through a protocol; WebMCP provides browser APIs for tools associated with the open page.

The page must be open, and the caller must support discovering and invoking its tools. This doesn't automatically give every chatbot or crawler access.

We used the imperative JavaScript API because our tools query existing content. WebMCP also has a declarative HTML-form API.

Two halves: build-time data, browser-time tools

The GitHub Pages hosting model fits neatly here: Hugo prepares the files at build time, GitHub Pages serves them, and JavaScript executes the tools in the browser.

Two-stage architecture: Hugo and Pagefind generate files for GitHub Pages at build time; a supported browser registers read-only tools and loads their data on demand.
The build prepares the data. The open browser tab executes the tools.

We already have the data. Hugo knows post titles, dates, tags, URLs, and descriptions. My Apps uses curated YAML, Podcasts uses show data, and Videos uses a weekly YouTube snapshot. Pagefind already indexes post text.

The integration gives callers a structured way to query those sources rather than creating a second content collection.

An app lookup, for example, filters catalog records in the tab. Full-text post search queries Pagefind's generated index instead. That split lets us reuse each source for what it already does well, rather than making the catalog a second search engine.

Build tools around the data you actually have

Debbie's implementation inspired the approach, but our six tools follow this site's content:

Tool What it returns
search-posts Pagefind-ranked published blog posts, with excerpts and matching heading links.
topic-brief Counts, first/latest publication dates, and newest highlights for posts carrying a real tag.
get-current-page Metadata, heading links, and existing eligible related posts for the open page.
list-apps Curated apps, filtered by query or platform, with website, store, and declared repository links.
list-podcasts Active or archived shows and listening links. Defaults to active shows.
list-videos Title filtering and Videos/Presentations selection from the limited weekly YouTube snapshot. Defaults to Videos.
Native Edge DevTools lists the site's six tools. Orange callouts mark the Application tab and WebMCP sidebar item.
Our six tools in the native WebMCP inspector, cropped and annotated to show where to open it.

Those scopes matter. topic-brief is a tagged-post inventory, not an AI-generated synthesis. Podcasts are shows, not episodes. Videos use the existing snapshot, not a complete archive, and don't search transcripts, chapters, or topic tags. Video responses include the sync date and source links.

Your site might only need post search and current-page context. Start with what your data can honestly answer!

Let Hugo generate the catalog

In hugo.toml, we added a custom output format:

[outputFormats.webmcp]
  mediaType = "application/json"
  baseName = "webmcp/index"
  isPlainText = true
  notAlternative = true

[outputs]
  home = ["html", "rss", "ghostrss", "webmcp"]

Keep your existing home outputs when adding the new format; this site's list includes its feeds.

Hugo uses layouts/home.webmcp.json to produce /webmcp/index.json, containing posts, pages, tags, apps, shows, and videos. Inside the eligible-page loop, this excerpt builds each page record:

{{- $description := .Description | default .Params.excerpt | default .Summary | plainify | htmlUnescape | replaceRE "\\s+" " " | strings.TrimSpace | truncate 300 -}}
{{- $record := dict "url" .Permalink "title" .Title "description" $description -}}

Posts also get publication dates, tag links, and reading time. Apps get declared platforms and links; videos get their collection and publication date.

This is metadata, not a copy of the site: no full article bodies, images, or players. Pagefind handles full-text post search.

Keep unpublished content out

Preview builds can include unpublished content, so Hugo's build settings aren't enough. The catalog and bootstrap share a webmcp-eligible.html partial that:

  • Excludes drafts, scheduled/future or expired posts, and robotsNoIndex pages.
  • Requires HTML output and excludes headless, render-excluded or unlisted pages, redirects, and 404s.
  • Omits tags without eligible public posts.

Sharing that check keeps the two halves aligned: a page excluded from the catalog doesn't gain tool registration just because we opened a draft preview. It also gives us one place to update the site's publishing rules.

Every emitted catalog record is public. Neither WebMCP nor noindex is access control. Never put private material in the snapshot and expect the browser API to hide it.

Give each tool a clear contract

In assets/js/webmcp.mjs, a shared helper adds pagination inputs, JSON Schema, runtime validation, explicit errors, and read-only annotations.

That shared contract makes another tool less work: describe its filters, choose a data source, and keep the handler focused on the query. It shouldn't need a different pagination convention or a new interpretation of what an invalid input means.

These are its schema and annotation fields, not a complete registration:

inputSchema: {
  type: 'object',
  properties,
  required,
  additionalProperties: false,
},
annotations: { readOnlyHint: true },

The helper supplies execute, checks inputs before calling tool-specific logic, and serializes failures with a code and message.

The app definition then filters the catalog. This excerpt uses that shared tool helper, the lazy catalog loader, and filtering/pagination helpers:

tool('list-apps', 'Discover the curated apps shown on My Apps, with platform, website, store and declared source links. Not every GitHub repo or a live availability check.', {
  query,
  platform: {
    type: 'string',
    enum: ['Windows', 'macOS', 'iOS', 'Android', 'Web', 'Stream Deck'],
  },
}, [], async (input, signal) => {
  const data = await catalog(signal);
  return listResponse(data.apps.filter(item =>
    matches(item, input.query) &&
    (!input.platform || item.platforms.includes(input.platform))
  ), input);
}),

The schema tells a caller what to send; runtime validation enforces it. The read-only hint describes behavior that the implementation must actually honor.

Load nothing extra for unsupported browsers

In layouts/_partials/scripts.html, eligible pages get a bootstrap that checks the native API before importing a fingerprinted module. Here it is, with the outer template guard omitted:

{{- $webmcp := resources.Get "js/webmcp.mjs" | js.Build (dict "targetPath" "js/webmcp.js" "format" "esm" "minify" true) | fingerprint }}
<script type="module">
  const api = document.modelContext;
  if (api && typeof api.registerTool === 'function') {
    import({{ $webmcp.RelPermalink | jsonify | safeJS }}).then(({ registerWebMCPTools }) =>
      registerWebMCPTools(api, {
        catalogURL: {{ "webmcp/index.json" | relURL | jsonify | safeJS }},
        pagefindURL: {{ "pagefind/pagefind.js" | relURL | jsonify | safeJS }}
      })
    ).catch(error => console.error('WebMCP registration failed', error));
  }
</script>

The Hugo expressions supply generated asset URLs. With another generator, use its asset pipeline and honor any repository base path, rather than assuming assets live at the origin root.

Unsupported browsers don't load the tool module, catalog, or Pagefind through this integration. Human-facing search can still load Pagefind independently.

In supported browsers, the catalog loads on the first tool call; Pagefind loads only for search-posts. Failed downloads can be retried.

Cropped native Network table with numbered highlights: 1 is the WebMCP module, 2 is index.json, and 3 is pagefind.js, followed by search-index requests.
1: tool module; 2: public catalog; 3: Pagefind. Captured after an app lookup and a post search. Registration alone loaded neither data source.

Read-only means no publishing, settings changes, or video playback. Cancellation stops one caller waiting without disrupting others sharing a load. If registration fails partway through, the module aborts its registration controller, removes the tools already registered, and reports the failure.

Small responses, honest pagination

Tools return JSON text with ok, plus explicit codes/messages for errors. Invalid input isn't disguised as an empty search.

Responses are capped at 4,000 serialized characters, using JavaScript string length. Lists default to five items, with a requested maximum of ten; the cap may shorten optional fields or return fewer items.

Results include:

  • hasMore: whether there is another page.
  • nextOffset: the continuation value to pass back unchanged with the same query and filters.
  • trimmed: whether optional information or the returned page was shortened to fit.

These are character limits, not measurements of tokens saved or model costs.

Cropped native list-apps result for macOS returns Tiny Clips and its links, total 3, with hasMore true, nextOffset 1, and trimmed false highlighted in orange.
One real result, with the continuation fields highlighted. Pass nextOffset back unchanged to get the next page.

Pagefind can include entries from preview builds, so search-posts checks candidates against the public catalog. It reads an extra eligible hit to determine whether more results exist without exposing a draft-inclusive raw total.

The cursor tracks search candidates, not just returned public results. Pass nextOffset back unchanged; calculating it from the item count could skip results.

Try the tools in Edge or Chrome

You can inspect the tools without an agent, then connect Copilot CLI in the next section. Use an up-to-date Microsoft Edge or Google Chrome build exposing the current native API. Edge comes first here, matching the screenshots.

Browser setup in Microsoft Edge

Microsoft's WebMCP Labs guide recommends current Canary or Dev builds, available from Edge Insider.

  1. Open edge://flags/#enable-webmcp-testing.
  2. Set WebMCP for testing to Enabled.
  3. Restart Edge when prompted.
  4. Open montemagno.com, right-click the page, and select Inspect. In DevTools, open Application, then WebMCP.

We verified this flag-and-restart workflow in Edge; the screenshots show its native inspector.

Browser setup in Google Chrome

For Chrome, follow its current WebMCP documentation:

  1. Open chrome://flags/#enable-webmcp-testing.
  2. Set WebMCP for testing to Enabled.
  3. Relaunch Chrome and open montemagno.com.

Check the API and call a tool

In either browser, run this in the page's DevTools Console:

typeof document.modelContext?.registerTool === 'function'

It should return true. Otherwise, update your browser or try a current preview build. If the API exists but no tools appear, reload and check the Console for registration errors.

On montemagno.com, discover and invoke a tool:

const tools = await document.modelContext.getTools();
const videos = tools.find(tool => tool.name === 'list-videos');
if (!videos) throw new Error('list-videos is not registered on this page');
const text = await document.modelContext.executeTool(videos, {
  collection: 'presentations',
  limit: 5,
});
const result = JSON.parse(text);
console.log(result);

executeTool receives the discovered tool object and an ordinary input object, as documented in Chrome's imperative API guide. The calls are the same in Edge and Chrome.

This is a useful first checkpoint. If discovery and execution work here, you've checked the site and browser without involving an agent or MCP bridge. Any later CLI connection problem can then be investigated as a separate layer.

Cropped native tool-discovery table lists the six names and their inputs. All six readOnly values are true in the orange-outlined column.
The native getTools() result, with the read-only annotations highlighted. No agent needed.

You can also use the Application > WebMCP inspector. Select topic-brief, enter github-copilot for topic, and inspect the input, completion status, and output.

What we checked: 83 offline gate tests passed, including WebMCP fixtures for publication rules and tool contracts. We also exercised all six tools through native Edge and checked normal search, theme switching, navigation, and lazy-network behavior.

For Copilot CLI, MCP-B's local relay is the focused option we used. It forwards a browser tab's WebMCP tools without adding a full debugging toolset.

We'll use Edge, but the same relay configuration works with Chrome. It exposes four management tools for sources, discovery, invocation, and opening pages, plus the connected site's tools.

GitHub Copilot CLI
  -> stdio -> WebMCP local relay on your machine
    -> loopback WebSocket, port 9334 -> browser adapter
      -> montemagno.com's native WebMCP tools

The tab needs a temporary browser adapter as well as the relay. This is client-side demo setup, not a website dependency or polyfill. The relay alone can't discover an arbitrary page, and this route doesn't require Chrome DevTools MCP.

1. Add the local STDIO relay

With Node.js 22 or newer and Copilot CLI installed, run its MCP configuration command:

Choose Local / STDIO in a connection-type picker. Copilot launches this process and talks through standard input/output:

copilot mcp add montemagno-webmcp -- \
  npx -y @mcp-b/webmcp-local-relay@6.2.0 \
  --port 9334 \
  --widget-origin=https://montemagno.com

Keep these connections distinct:

Connection Setting
Website open in Edge or Chrome https://montemagno.com/
Copilot CLI to the MCP relay Local / STDIO, using the command above
Browser adapter to the relay Loopback WebSocket on port 9334

Neither port 9334 nor the website is an HTTP MCP endpoint. There is no /mcp URL to enter. The relay reference documents its loopback binding; don't expose it on your network.

Restrict --widget-origin to the page's exact origin: scheme, hostname, and port if present, not the relay's address. Change it when adapting this setup to another site or development server.

Start or restart copilot, then check /mcp show montemagno-webmcp. Confirm it is connected before loading the adapter. Nothing is being installed on GitHub Pages.

2. Connect your Edge or Chrome tab

Open montemagno.com in the browser prepared above. In that page's DevTools Console, load the adapter:

const bridge = document.createElement('script');
bridge.src = 'https://cdn.jsdelivr.net/npm/@mcp-b/webmcp-local-relay@6.2.0/dist/browser/embed.js';
bridge.dataset.relayPort = '9334';
bridge.addEventListener('error', () =>
  console.error('WebMCP relay adapter failed to load')
);
document.head.append(bridge);

Keep the ports matched: --port 9334 and bridge.dataset.relayPort = '9334' must agree. If the port is occupied, choose an unused one and change both.

Review the embed documentation before loading third-party code. Both examples pin version 6.2.0. A reload, including development live reload, removes the adapter; paste it again to reconnect.

The browser may request Local Network Access permission. Review it rather than disabling protections. A site's content security policy can also block the adapter; consult the relay's troubleshooting guide.

This relay doesn't automate the browser or create a separate profile. Keep the connected page open in a dedicated demo window without private tabs or accounts.

3. Send the prompt

Try this prompt in Copilot CLI:

Use the montemagno-webmcp MCP server. Call webmcp_list_sources and
webmcp_list_tools, then select the source at https://montemagno.com/.
Use the actual relayed tool names returned by discovery to call the
site's list-apps with platform macOS and limit 2, then topic-brief
with topic github-copilot and limit 2.

Show the tool names and linked results. Use the registered WebMCP
tools, not answers inferred from scraping. If no source is connected
or a tool call fails, report the blocker instead of inventing results.

The relay converts list-apps to MCP-safe list_apps, so use the discovered names. Our run found one source and six tools, then successfully called the app and topic tools.

If you only see the four webmcp_* management tools, the relay process is available, but you still need to check its connected sources. Client tool lists don't always refresh immediately, so use the discovery calls rather than guessing whether the adapter connected.

The opening screenshot uses our local-test alias, montemagno-webmcp-local. These public-site examples use montemagno-webmcp. Keep your chosen name consistent between configuration and prompts.

Optional: automatically launch Edge or Chrome

You can skip this if you followed the relay recipe. Chrome DevTools MCP is an alternative that launches its own browser and adds broader debugging tools. It supports Edge and Chrome without the temporary adapter.

These commands are for macOS, Edge first. Use a current Node.js LTS release and a browser exposing native WebMCP.

Microsoft Edge:

copilot mcp add montemagno-edge -- \
  npx -y chrome-devtools-mcp@1.13.0 \
  --executablePath="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" \
  --categoryExperimentalWebmcp \
  --chromeArg=--enable-features=WebMCP \
  --isolated \
  --no-usage-statistics \
  --no-performance-crux

Google Chrome:

copilot mcp add montemagno-chrome -- \
  npx -y chrome-devtools-mcp@1.13.0 \
  --categoryExperimentalWebmcp \
  --chromeArg=--enable-features=WebMCP \
  --isolated \
  --no-usage-statistics \
  --no-performance-crux

The server auto-detects Chrome. For Edge Dev/Canary or another OS, adjust the executable path using Microsoft's guide.

The WebMCP category exposes discovery/execution tools. --chromeArg passes the feature flag to either browser; the isolated profile doesn't inherit everyday settings. The last two flags disable usage statistics and CrUX lookups.

Choose one command, start copilot, and check /mcp show montemagno-edge or /mcp show montemagno-chrome. Edge's prompt is:

Use the montemagno-edge MCP server to open https://montemagno.com/.
Call list_webmcp_tools, then use execute_webmcp_tool to call the site's
list-apps with platform macOS and limit 2. Show the linked results.
Use native WebMCP, not scraping. Report any API or bridge blocker.

For Chrome, substitute montemagno-chrome. Keep private tabs/accounts out of the demo profile and approve only intended actions; this bridge can do more than call read-only site tools.

Try this on your own static site

The takeaway isn't to copy our six tools. Choose useful read-only operations for your existing public data and make them a tested browser enhancement.

Give this prompt to a coding agent in your site's repository. It starts with an audit and approval checkpoint, not assumptions about your generator or content:

Help me evaluate and integrate WebMCP into this static website.
Start in plan mode. Inspect the repository before proposing changes.

Identify the generator, hosting/base path, build/deploy workflow, existing
search engine, public content collections, curated data, and publishing
rules. Read current official WebMCP browser/API/trial documentation.
Report useful read-only tools supported by the actual data, their exact
scope, and missing capabilities. Do not assume video tags, transcripts,
chapters, podcast episodes, or cross-content search exist. Recommend a
small tool set and wait for my approval before implementation.

After approval, reuse existing sources and search logic. Generate only
eligible public metadata at build time; exclude draft, scheduled, future,
expired, noindex, headless, render-excluded, and non-HTML content according
to this site's rules, including preview builds and draft-only taxonomy
entries. Treat every emitted file as public, not private application state.

Use the current native browser API with feature detection before loading
the tool module. Load catalogs/search lazily, preserve ordinary UX, and
avoid a backend, hosted model, chat widget, or unnecessary dependencies.
Honor the site's base path. Declare truthful schemas and read-only hints;
validate inputs at runtime; return explicit errors; support cancellation,
retryable loads, and cleanup after partial registration failure.

Choose and test a serialized response cap, bounded item limits, and
continuation that never skips or duplicates eligible records. Explain
trimming, distinguish empty results from failures, and never expose
unpublished search data or draft-inclusive totals.

Add focused offline fixtures and prove native discovery/execution in a
supported browser, not just a shim. Test unsupported-browser network
behavior, normal search/theme/navigation, and publication boundaries.
Report actual results and blockers, not invented benchmarks.

Document browser/client prerequisites and use the real public website URL
in examples. If you include an MCP bridge, specify its transport, allowed
page origins, and matching browser/server port settings. Request my
approval before deployment or changes to external services, browser trial
enrollment, or account configuration.

There you go: a static website can offer browser-side tools without becoming a server application. Start with the data you have, keep the scope honest, and make sure everyone else can keep using the same website.

]]>
Twitter Lite - Progressive Web Apps - The Good, Bad, & Ugly https://montemagno.com/twitter-lite-pwa-good-bad-ugl/ 598df8f2c121b60019bf2fcd Tue, 11 Apr 2017 16:44:49 GMT

Twitter recently launched Twitter Lite a stripped down “faster” and more “data friendly” version of their mobile app and refresh to their mobile website. It is more than just a new mobile website, it really is a Progressive Web App (PWA) that offers up notifications, camera integration, and some of the common features of twitter such as timelines, tweeting, and direct messages. It also benefits from being really small, under 1MB to use with nothing to install, and has a really cool feature called Data Saver that wont auto download images or videos in your timeline. This is a nice touch that should just be a standard feature of the Twitter client. You are probably saying wow!, all of that from a PWA, does this mean that is the future? Well no, let’s actually break down the app itself.

The Audience for Twitter Lite

The idea behind Twitter Lite or any other “Lite” application out there (Skype, Facebook, etc), is that it is an extremely small application for emerging markets where internet is hard to come by. The “Lite” apps aren’t really for the average consumer as they have plenty of space on their phones/tablets and WiFi/LTE usually isn’t a huge concern. While Skype and Facebook, from what I can tell, just produce stripped down native apps that are region locked on the app stores, what Twitter did was create an actual PWA that technically anyone could get by going to the mobile site and pinning it to their home screen. So looking at it from the prospective that I am not the target customer for this PWA, but I am developer who is interested in technology, how does it compare on both iOS and Android?

Performance / Nativish UI

So, first off when I go to mobile.twitter.com on my iOS 10.3 device I just got a blank screen until I cleared the cache, which was not a good start (also I had to delete the twitter app from my device to even get it to work, but YMMV). Now I know technically PWAs aren’t an iOS thing since a lot of the features aren’t in Safari yet or whatever, even though you have been able to pin apps for a long time.

On Android, it was pretty seamless and I actually have the PWA side by side with the main Twitter client. 

There it is! It is in a folder, not in the app drawer as it isn’t an app and can’t be placed there. This means if I delete the icon on the launcher the PWA is gone! There are some good things here the PWA does, such as have a splash screen, it runs in full screen, and a few native features that I will talk about in a bit. You can tell though that it doesn’t really have full control over this experience. The splash screen for instance is dull and takes a few seconds to load on my 6P:

Once loaded though we get an interesting look of an app… kind of app, but not really like an Android app, some similarities, but a bit different. 

Additionally, it looks 100% exactly the same on iOS with the material design look, which is odd for any iOS user if it is supposed to be app like.

A few issues first arise with the “app”, which is that you can’t fling through the tabs like a native app, there are no animations at all for the floating action button, the scrolling performance itself is a bit laughable as there is often blank space or pop in of full tweets. There is no flyout navigation at all and you have to know to tap on your profile picture to display a very odd settings menu that is embedded into whatever tab you happen to be on (and the FAB sits on top of it). Fonts are off and strange and like a lot of the “web/react” apps out there the toolbar is just a hot-mess with improper fonts, sizing, and height. Additionally, we see some lacking functionality from simple screens such as the profile edit.

Profile Screen - (Twitter Lite on Left, and Twitter App on Right)

The fact that the ENTIRE window scrolls up and down really shows just how much it is actually just a full screen window running in Chrome. If that wasn’t bad enough, each and every page you open gets added on to the navigation stack (like a website), this adds to frustration when navigating around. My favorite bit of performance has to be the toggle switch to turn on and off features, which lags by about 3 seconds after touching to change the toggle, “fast”.

Native Capabilities

One thing that PWAs talk about is that they have access to some native capabilities. There seems to be some differences here between each operating system and browser of the operating system. For instance on iOS you can take a photo or pick a photo when tweeting, but on Android you can only take a photo. With “push notifications” this seems to also only be on Android, with no options at all on iOS.  It is clear though that it is very limited, just by drafting a new tweet:

New Tweet (Twitter Lite on Left, Twitter App on Right)

What we notice is that poor Twitter Lite has a single button and a weird layout to send a tweet (that tiny tweet button up there is weird!!!!). Over on the main app, it is tying into my recent screen shots, I can take a photo, add location, add a gif, and has a proper sized tweet button.

Notifications

I will say that this is kind of cool that on Android PWAs you can receive push notifications. I have all of mine turned off on Twitter, but I decided to test it out. Remember that Twitter Lite is NOT an app, it is running in Chrome in a special mode. This means that when the push notification comes in, which it does fast, there is some interesting things that happen:

We clearly see that a website (mobile.twitter.com) sent us the push notification and that it actually came from Chrome. Odd, but even more interesting is there is a lack of functionality here in the push notification as there is no place to reply at all and there is this weird “Site Settings”. When I actually clicked on that it launched Chrome and crashed the Twitter Lite PWA and Chrome itself on Android. I had to go in and force quit Chrome to get the Twitter Lite app to restart, which was a fun adventure after using the app for only a few minutes.

Camera + Permissions

I mentioned that on both clients, you could take a photo with your tweet. This is nice and websites also have this capability to a certain extent based on the browser, but on iOS and Android there are strict restrictions on permissions. This means when you actually go to take a photo, you are prompted for permission from CHROME, not Twitter Lite:

This seems sort of like a weird security gap with PWAs as now any site/PWA would have this permission allowed if I let it and also is pretty confusing for a user.

Offline Mode

A huge advantage of native applications is that you truely have full access to the entire operating system and every API. This means you can craft lovely online and offline experiences, deep integrations with databases, realtime notifications, etc, you get it. So what happens when you go into airplane mode and launch Twitter Lite:

That is right… you get a shell of an app with nothing cached and no way to do anything. It doesn’t tell me I am offline for some reason, which is a bit odd. On the Twitter client I get to browse all of my past cached content, with pretty smooth scrolling. Now, reading the PWA site it says this should be capable of caching for offline, but maybe Twitter didn’t take this into consideration even though the app itself was made for users with extremely poor to no internet connection…. just saying.

Wrapping Up

At this point you are probably saying, wow… James must really hate Twitter Lite and PWAs. I wouldn’t say that at all, I think that Twitter Lite is an interesting step to build apps for emerging markets, but I think it just fails on a lot of things that could be part of the main Twitter application that everyone could benefit from. Additionally, I feel as though Twitter could have made some really stripped down native apps that focus on less features instead of trying to do everything with a PWA and updated mobile site (although I will say it is better than before). So, what does this mean for mobile apps? As I have said for the past 6 years, native apps are kings and queens with full access to native APIs, performance, and user interfaces and is how I recommend building applications. If you are building apps with native language or native with Xamarin this is what you can deliver to your users in the app store. Are PWAs a waste of time? I don’t think so if you have the development resources to dedicate on them and offer a richer experience to users that won't install your app. The win here for Twitter is to bring more people to Twitter that may just be browsing on the mobile site instead of installing the full app. They can get them to pin Twitter Lite and once users want the full experience they move to the native client. That does seem like a good strategy to me.

]]>