Embed eSalah prayer times on your site
One tag, zero dependencies, no tracking. Accurate daily prayer times for any latitude/longitude, styled to look sensible on any page.
Quick start
Paste this snippet anywhere in your HTML. The example below is London (51.5074, -0.1278) — swap in your own coordinates.
<div data-esalah-prayer-times
data-lat="51.5074"
data-lng="-0.1278"></div>
<script async src="https://esalah.com/embed/times.js"></script> Live preview
This is the actual widget — the same snippet above, running on this page right now.
Attribute reference
Configure the widget by setting data-* attributes on the container.
| Attribute | Required | Description |
|---|---|---|
data-lat | Required | Latitude in decimal degrees. Example: 51.5074. |
data-lng | Required | Longitude in decimal degrees. Example: -0.1278. |
data-method | Optional | Calculation method slug or numeric ID (e.g. isna, mwl, umm-al-qura, egyptian). If omitted, the server picks a country-appropriate default from the coordinates. |
data-timezone | Optional | IANA timezone (e.g. Europe/London, America/New_York). Defaults to the visitor's browser timezone via Intl.DateTimeFormat(). |
Multiple widgets on one page
The widget initializes on every [data-esalah-prayer-times] element it finds on the page. You can show prayer times for multiple cities side-by-side — e.g. a community hub with chapters in several cities — using the script once and as many container divs as you like.
Privacy
The widget fetches /api/v1/times with credentials: 'omit'. That means:
- No cookies are sent to eSalah from your visitors' browsers.
- Your visitors are not identified or tracked by us.
- Only the coordinates you configure are transmitted — no IP logging, no fingerprinting.
- The widget style is inlined into each render — it can't read or modify your page's CSS or other cookies.