QuavernQuavsit

Section 14 of 14

Widget

A widget is the next departures from one stop, embedded in your own web page: a restaurant's "how to get here", a venue's practical information, a town hall's homepage, a coworking space's front door. You configure it on myQuavern and paste one <iframe> into your site. It spends your Quavsit units, through the same plan, overage and spend cap as the API, and nothing else.

What you get#

One stop, two to eight departures, and the foot line that credits the operator. Each row is the line mark, the destination, the time until departure in whole minutes and the clock time. The amber square marks a departure that is genuinely real-time; a timetable row stays in ink, and the difference is in the text a screen reader announces as well as in the mark.

You can add one service alert line, and one walking line — the distance and the walk from your own address to the stop, as a straight-line estimate at 4.5 km/h. No routing service is called and there is no map.

Setting one up#

The editor is on myQuavern, under Quavsit widgets. You choose the stop, the lines, how many departures to show, the refresh interval, the daily unit cap, whether alerts appear, the walking address, the theme, the language, the heading, and the sites allowed to embed it.

That last list matters: a widget is served to the origins you name and to nobody else. Each is a scheme and a host with no path, https://example.com or https://*.example.com; http://localhost is accepted too, so a site can be built before it ships. Between one and five origins.

The snippet#

The editor writes the snippet for you, with the height already computed for the number of rows you asked for.

html
<iframe src="https://quavsit.quavern.com/embed/qvw_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
        title="Next departures — Quinconces"
        width="100%" height="232" loading="lazy" referrerpolicy="origin"
        style="border:0"></iframe>

referrerpolicy="origin" is deliberate. The embed needs to know which site is framing it, so that it can check your list of origins, and it needs nothing more than the origin: the page's address is never sent.

If your layout changes the width, the height can change with it. Add the resize helper once, anywhere on the page, and each Quavsit iframe is given its own rendered height:

html
<script src="https://quavsit.quavern.com/embed.js" defer></script>

The helper is under one kilobyte. It listens for a message from quavsit.quavern.com and sets the height of the iframe that sent it. It adds no global, stores nothing and sends nothing anywhere.

States#

The reader of your page is not a Quavsit customer and never signed up for anything, so the embed never shows an error code, a plan or a login. Every state is one quiet sentence in the widget's own language.

StateWhat the reader sees
Departuresthe list, and the time it was drawn
Nothing due"No departure in the next 90 minutes."
Live feed silentthe list, plus "Times from 14:02; the live feed is not answering."
Upstream failure"Departures are unavailable right now."
Paused"This departure board is paused."
Out of units, cap reached, account inactive"This departure board is not available."
Unknown token, or a site that is not on the list"This departure board is not available."

You see the real reason in the editor, and for a spent quota or a reached daily cap you get one e-mail a day.

What it costs#

A refresh reads one stop's departures and costs 1 unit, the API's read weight. A widget is refreshed at most once per interval however many visitors have your page open: the second visitor inside the window is served the first one's answer for nothing. With alerts on, the stop's alerts are read at most once every 300 seconds, for 1 unit.

Nobody looking costs nothing. The page reads only while the iframe is on screen, so a background tab, a collapsed accordion and a phone in a pocket are free, and a reading session stops after twenty minutes with a "Show live times again" control. A page left permanently open therefore stops on its own; a place with a screen wants a departure board instead, which is built for it.

The cost follows visits rather than traffic peaks: roughly one unit per visit, fewer when visits overlap, and never more than the daily cap you set. On the free plan the cap is 150 units a day, which is about 150 visits a day at the free interval of 120 seconds and stays inside the 5 000 units a month the plan includes.

PlanWidgetsFastest intervalDaily cap, default and maximum
Free1120 s150 / 150
Pay as you go360 s600 / 2 000
Starter560 s600 / 2 000
Pro2030 s2 000 / 10 000
Max5030 s5 000 / 43 200

A plan change never edits a widget: a downgrade keeps it and applies the new floor, and the editor says which number is being used and why.

Privacy#

The visitor reading your page never asked Quavern for anything, so the embed costs your page nothing you have to explain. It sets no cookie, writes nothing to localStorage or sessionStorage, and makes no third-party request: the fonts, the styles and the data all come from quavsit.quavern.com. There is nothing here for a consent banner to cover.

The page is served noindex, nofollow and is absent from the Quavsit sitemap: the content belongs to your page, not to anybody's index.

Two things do reach Quavern's server, as they do for any image or frame a page loads: the origin of your site, sent by the browser because the snippet asks for it and used only to check your list, and the reader's address, which the server needs in order to answer at all. The reader is not identified, profiled or measured, and the widget carries no analytics of any kind.