ChennaiAstronomyClub / chromapod

A Chrome extension to display APOD images in your new tabs.
0 stars 0 forks source link

Cache image on first load to avoid repeated loading of the same image #1

Closed astronomersiva closed 8 years ago

astronomersiva commented 8 years ago

Currently, the image is downloaded every time a new tab is opened. Should cache it so that images are loaded only once in a day saving bandwidth and the API limits.

Tried localStorage but that approach runs into tainted canvas error as APOD does not seem to have CORS enabled.

astronomersiva commented 8 years ago

@sid9611 :bell:

astronomersiva commented 8 years ago

For now, I have stored the API response in the localStorage to reduce the number of API calls. Implemented in commit 7cabee06bf9c8217f90b731a7017f1315389ce9a

sid9611 commented 8 years ago

Ooh this is nice! I will look into it after exams :P

On Fri, Jan 22, 2016 at 8:57 AM, Sivasubramanyam A <notifications@github.com

wrote:

For now, I have stored the API response in the localStorage to reduce the number of API calls. Implemented in commit 7cabee0 https://github.com/ChennaiAstronomyClub/chromapod/commit/7cabee06bf9c8217f90b731a7017f1315389ce9a

— Reply to this email directly or view it on GitHub https://github.com/ChennaiAstronomyClub/chromapod/issues/1#issuecomment-173794194 .

astronomersiva commented 8 years ago

Sure. Also take up the ISS pass notification extension that we were talking about. Closing this issue for now as API responses and images are being cached.