How Mediff works
Mediff turns public MedEx brand pages into a side-by-side comparison. This page explains where the data comes from, how the diff is calculated, how long data is cached, and what the result cannot tell you.
Where the data comes from
MedEx (medex.com.bd) is a public medicine catalogue for Bangladesh. Every brand page lists its generic, strength, dosage form, manufacturer, prices and monograph sections. Mediff reads those public pages on demand; it does not have its own drug database and does not edit the published text.
Parsing runs on Cloudflare Workers with the streaming HTMLRewriter API. The parser only keeps known fields, strips every attribute from section HTML, and allows a small tag whitelist, so upstream markup is never trusted. The same parser serves the browser API and the server-rendered comparison.
What is compared
- Brand facts: generic, strength, dosage form, manufacturer, unit and strip price, and pack size.
- Monograph sections: indications, pharmacology, dosage, interactions, contraindications, side effects, pregnancy, precautions, overdose and storage.
- Text diffs: brand names are masked before comparing sections, so “Monas is indicated for…” and “Montair is indicated for…” do not mark the whole section as different.
- Lowest price: only flagged when the brands share the same generic, strength and dosage form, because only then are the prices directly comparable.
Caching and freshness
Parsed brand pages are cached for up to six hours and search results for up to ten minutes. Curated comparison pages are cached at the edge for up to one hour, with cache tags that can purge a single brand or comparison. The data can therefore lag behind MedEx; prices and availability change often.
Indexing policy
Comparison URLs end with the MedEx brand id, so the numeric id is authoritative and the words before it are cosmetic. Legacy ?ids= links redirect permanently to the path form. Only the curated comparisons in the registry are indexable and listed in the sitemap; every other combination is usable and shareable but marked noindex, follow to avoid near-duplicate pages.
What Mediff cannot tell you
Mediff is a comparison aid, not a medical reference or prescribing system. It does not establish bioequivalence, does not check whether a substitution is clinically appropriate, and does not review the underlying monograph. A brand page that is missing or changed on MedEx can produce an incomplete comparison or a failed field.
Corrections
If a comparison looks wrong, check the linked MedEx page first. Mediff reproduces the published data as-is, so corrections to the underlying monograph, price or availability belong with MedEx.
Read the FAQ for short answers about the data source and limits.