Closed bhansa closed 6 years ago
compression report for timeline images:
Yeah you can remove the unwanted images. But don't think it would create much of a difference in site load anyway since only included images are the one that affect the site load performance isn't it ?
If we are not including them on the page, then it's fine to keep them the same way or we can just move them to a different folder altogether. One more thing can we have a different image for Sidu ponnappa, the current one is not clear.
Added the service worker code to cache js/css/json files, please review and suggest. Also if there is any other better approach please let me know.
@bhansa Is there any way to measure how much the speed improved due to caching ? Also do the cache-polyfill.js
ans service-worker.js
needs to be kept outside the js folder ?
service worker has to be in the root folder, so that's fine. We can check the speed using lighthouse extension.
@bhansa please go through this doc which can help you understand how to provide proper versioning to the service worker.
Sorry for the delayed response. This looks good to go. Here are the stats. There is a significant improve in performance
Before
After
@bhansa Can you keep the changes of compressing images and the caching in 2 separate PRs. The first change is good to go. But we need to think a bit more about the caching stuff.
I observed that caching may cause the website to not reflect changes that we pushed recently and often we need to do a hard reload which we usually forget. So we need to expire the cached data after a time interval so that it tracks changes when we push them.
@ananyo2012 I have reset this branch, please check and merge.
Thanks @bhansa . Merging this. Do make another PR for caching part. We can continue discussion there.
Partly solves #163