Skip to main content

Browser Tab Notifications

Better Messages shows unread messages in the browser tab of your site, so members notice them while they read another page or work in another tab. The tab can show the unread count in its title, a symbol next to it, a badge on the site icon and a title that flashes when a new message arrives.

Compatibility
This feature compatible with Better Messages 3.3.1 or higher

What it adds#

  • The unread count in front of the page title, for example (3) My Site
  • A symbol after the count, for example (3) ๐Ÿ”ด My Site
  • A badge on the site icon of the tab, with the unread count or a dot
  • The shape of the badge (round or square), its colour, the colour of its number and the corner it sits in
  • A title that switches between the page name and New message while the tab is in the background
  • A switch for each member to turn it all off for themselves

The badge on the icon is the most visible of them: a browser shows the icon of every tab, while a long title is cut off as soon as several tabs are open.

How to set it up#

Go to WP Admin โ†’ Better Messages โ†’ Settings โ†’ Notifications โ†’ Browser Tab.

Settings, Notifications, the Browser Tab section: a preview of the tab with a square badge of 3 on the site icon and (3) and a red circle before the site name, then Browser Tab Notifications, Title Symbol, Flashing Title, Site Icon Badge, Badge Shows, Badge Shape, Badge Color, Badge Text Color, Badge Position and Browser Tab Control

The preview at the top of the section shows the tab as a member sees it with three unread messages, and changes as you change the settings. It draws the badge on your own site icon (Settings โ†’ General โ†’ Site Icon in WordPress), or on a plain globe when the site has none.

SettingWhat it does
Unread Count in TitleShows the unread count in front of the page title. On by default
Title SymbolAdds a symbol after the count: a coloured circle, a bell, a speech bubble, an envelope or a dot
Flashing TitleWhen a message arrives while the tab is in the background, the title switches between the page name and New message until the member opens the tab
Site Icon BadgeDraws a badge on the site icon while there are unread messages. Off by default
Badge ShowsThe unread count (9+ above nine, as more does not fit on a tab icon) or a dot
Badge ShapeRound, or square with slightly rounded corners
Badge Color and Badge Text ColorThe colour of the badge and of the number on it. Red and white by default
Badge PositionThe corner of the icon the badge sits in
Members Can Turn Tab Notifications OffLets members turn browser tab notifications off in their own settings

Save the settings with Save Settings at the bottom of the page.

What members can choose#

With Members Can Turn Tab Notifications Off on, every member finds Show unread messages in the browser tab in the Notifications group of their messenger settings. It is on until they turn it off, and turning it off removes the count, the symbol, the flashing title and the badge for them. Guests have the same choice.

The Settings screen of the messenger, with Show unread messages in the browser tab checked in the Notifications group, under the email notification choices

Other plugins in the tab#

Some plugins write their own count in the title too, PeepSo and some chat plugins among them. When another plugin puts its own count in front of the title, Better Messages leaves the title to it instead of writing over it, and the site icon badge keeps showing the unread messages. Once that count is gone, the title shows the Better Messages count again.

Sites that change pages without reloading, such as the FluentCommunity portal, get the count on each new page at once.

Frequently asked questions#

Can the title be bold or in colour?#

No. A browser shows the tab title as plain text and gives a website no way to style it. That is why the symbol and the badge exist: the symbol adds colour to the title, and the badge puts it on the icon.

Does the badge work in every browser?#

Chrome, Edge and Firefox show it. Safari on a Mac does not always redraw the icon of a tab after the page has loaded, so it may keep showing the plain site icon. The title count works in every browser.

The site icon is served from another domain (a CDN) that does not allow the browser to read it, so the badge is drawn alone. Allow cross-origin requests for the image on your CDN, or serve the icon from your own domain. A site with no site icon gets the badge on the icon its server answers for /favicon.ico. Set one in Settings โ†’ General โ†’ Site Icon.

How fast does the title flash?#

About every second and a half while the tab is in the background. Browsers slow down timers in background tabs after a few minutes, so a tab left in the background for long flashes less often. The flashing stops as soon as the member opens the tab.

Does it work on the free version?#

Yes. Browser tab notifications work in the free and the WebSocket version alike.

Does the mobile app show it?#

No. The app has no browser tabs, so these settings do nothing there.

See also#