We have been using WeatherAPI’s forecast endpoint for a long time:
https://api.weatherapi.com/v1/forecast.json
?key=${apiKey}
&q=${currentUserLocation}
&days=1
&aqi=no
&alerts=no
&lang=${lang}
This endpoint already provides:
- Current weather data (updates every 15 minutes)
- Hourly forecast for today (00:00–23:00)
Current behavior:
- Only the current weather data is being used.
- Data retention:
- 7.25 minutes when the user provides their own API key
- 16 minutes otherwise
- Forecast data returned by the API is ignored.
Proposed change:
- Store additional data from the same API response
- Persist today’s hourly forecast data along with current conditions.
- Enable offline support
- When offline, fall back to the stored forecast data instead of showing no weather.
Offline behavior example:
- User fetches weather data once today while online.
- Later, the user goes offline and opens the browser at 10:40 AM.
- The extension should display the 10:00 hourly forecast data.
- The same logic applies throughout the day:
any time between HH:00:00 and HH:59:59, show the forecast for that hour.
We have been using WeatherAPI’s forecast endpoint for a long time:
This endpoint already provides:
Current behavior:
Proposed change:
Offline behavior example:
any time between HH:00:00 and HH:59:59, show the forecast for that hour.