পণ্যের অংশে চলে যান
LCPanelলাইসেন্স সেন্টার প্যানেল
MMB MyMeetBook টি অধ্যায়

MyMeetBook ডকুমেন্টেশন

অনলাইন / অফলাইন

ইন্টারনেট চলে গেলেও সাইট চলে: অফলাইন / আবার অনলাইন পপ-আপ, আগে খোলা পেজ ব্রাউজারের ক্যাশ থেকে "সেভ করা কপি" স্ট্রিপসহ, পোস্ট-কমেন্ট-লাইক সারিতে রেখে পরে পাঠানো, আর কানেকশন ছাড়াই খেলা যায় এমন নিজস্ব গেম Signal Keeper।

প্লাগিনগুলো হালনাগাদ ৬ নভে ২০২৬ ৩৮ / ৪০

The Online / Offline plugin keeps MyMeetBook usable when the internet drops. A pop-up tells the member the connection is gone (and tells them again when it is back), the pages they already opened keep working from the browser's own cache, what they post, comment or like while offline waits and is sent later, and there is a game to pass the time - Signal Keeper, made for this plugin, that plays with no connection at all.

What members see

  • The pop-up: a card at the top centre of the screen (a bottom sheet on a phone) with an animated signal icon: You're offline - the internet connection is gone. Pages you opened before still work... and a Play a game while you wait button. When the connection returns, the same card turns green - You're back online - and hides itself after a few seconds. It never takes the keyboard focus, screen readers read it out (role=status), it follows light / dark mode, and it does not animate for people who asked their device for reduced motion.
  • Saved pages: the feed, profiles, posts, groups, the messages list - every page a member opened is kept in their browser. Offline, it opens from there with an orange strip on top: Offline - showing a saved copy from 29 Oct, 14:05. A page that was never opened shows the offline page with This page was not saved for offline use yet.
  • Save for offline: a row in each post's ⋯ menu keeps that post's page right away.
  • The offline queue: a comment, a like or a text post made offline is kept in the browser and the member sees Saved here. It will be sent when you are back online. A small pill at the bottom left counts what waits (1 waiting to send). When the connection is back everything is sent in order and a toast says Sent 1 things you did offline. Posts with pictures or videos are not queued (the upload needs the connection).
  • The offline page (/offline) and the game page (/offline/game): both are kept in every browser, so they open with no connection. When the connection comes back while someone plays, the game pauses and asks You're back online - keep playing? with Keep playing and Back to the site.

Signal Keeper

You keep a little world connected. Messages, likes and signal bars fly in from space towards the hub in the middle; turn the dish around it to catch them, and keep it away from the red static.

  • Catching a message gives 10 points, a like 25, a signal bar gives one bar back. Catch in a row and the points multiply (x2 ... x5).
  • A message that slips past costs half a bar of signal, static that hits the dish costs a whole bar. No signal left - Connection lost.
  • Each level asks for a few more catches; things fly faster, the static comes in from level 2, items curve from level 3 and trains of messages arrive from level 4.
  • Controls: mouse or finger (point where the dish should go), arrow keys or A / D, Enter or Space to start and pause, P / Esc to pause, M for sound. A TV remote's arrows and OK work too.
  • Sound is off until the player turns it on (small beeps made in the browser, no files). The best score is kept in the browser.

Admin: Plugin pages → Online / Offline

SettingWhat it does
The pop-upThe offline / back online card.
The gameSignal Keeper on /offline and /offline/game, and the game button in the pop-up. Off: /offline/game answers 404.
Offline browsingKeeping pages, pictures and API reads in the browser. Off: only the offline page is kept.
The offline queueComments, likes and text posts made offline wait and are sent later.
"Save for offline" on postsThe row in the post menu.
Pictures kept, at mostMegabytes of pictures each browser may keep (default 40). The oldest go first.
Pages kept, at mostHow many pages each browser keeps (default 60).
Last pages a member opened that are kept freshThe member's most recent pages are fetched again in the background so the saved copy is new (default 8).
Wait for the network before using the saved answerFor API reads: after this many seconds without an answer the saved one is used (default 4).
Pages to keep for offlineKept for every signed-in member as soon as they open the site: one address per line, {profile} = their own profile. Default: home, notifications, messages, friends, own profile.
Never keep these tooMore path prefixes that must never be kept (added to the built-in list).
The pop-up wordsYour own title and text for the offline and back-online card; empty = the default words in the visitor's language.
Clear the offline cache of every visitorRaises the cache version: every browser throws away its saved pages, pictures and answers the next time it checks the site.

Never kept, whatever the settings say: the admin panel, sign-in / register / password / two-factor pages, the wallet, Pro and payment pages, private files (/uploads/files, /uploads/messages), live pages and meetings, the cron and system addresses, anything that is not a GET request (so no API POST is ever stored), video and audio ranges, other sites, and addresses that carry a download, token or key.

How it works (for developers)

  • One service worker, at /sw.js (served by core, Service-Worker-Allowed = the site folder, Cache-Control: no-cache). The plugin answers the core filter service_worker_js at priority 90 with its own worker. With the Mobile Apps plugin on, that plugin's worker text is handed over first; Online / Offline reads the files it kept (pwa.js, the app icon) out of it and keeps them too, and the manifest (manifest filter: name, icons, shortcuts) is left to Mobile Apps. There is never a second worker to fight with.
  • Cache rules: the app shell (offline page, game page, the site CSS / JS, this plugin's files) and every CSS, JS, font and icon under /assets, /plugins/*/assets and /themes - cache-first, the cache name carries a version made from the files' own versions; pages - network-first, the saved copy after a failure or 8 s of nothing; pictures under /uploads - stale-while-revalidate with the size cap; /api reads - network-first with the short timeout.
  • The offline queue lives in the browser's IndexedDB (mmbo-queue). It is sent by the page on the online event, and by Background Sync (sync tag mmbo-queue) where the browser has it; both take the waiting items in one transaction, so nothing is sent twice. Items made by another member on the same browser are dropped, and a different member signing in empties the saved pages.
  • Filters: offline_precache (more addresses to keep), offline_never (more prefixes never to keep), offline_queue_actions (more /api actions that may wait in the queue; default comment/create, reaction/set, post/create, post/save, friend/request, follow/toggle).

Good to know

  • Safari on iPhone keeps a site's saved data for a limited time when the site is not used, and has no Background Sync: the queue is sent when the page is open and the connection comes back.
  • The saved copies live only in each member's own browser; nothing is stored on the server.
এটি কি কাজে লেগেছে?
এই অধ্যায়টি শেয়ার করুন