How to Cache Data with LocalStorage

preview_player
Показать описание
This video covers the fundamentals of how you can do fetch calls to retrieve JSON data from a server and then cache that data and do updates at regular intervals.

Рекомендации по теме
Комментарии
Автор

Love ur explanation style. Studying in Canada and unfortunately don’t get such qualitative content during the classes( You really seem to know how to teach and explain) Thanks

muhammadtadjiev
Автор

Thank you Steve, great as always! I know this is out of the scope of the video (also new at php) but in the data.php file _$obj_ is declared as an _array()_ and then assigned object properties; is this a standard way of declaring objects in php? Does it get converted? Thank you!

AdrianSkar
Автор

Great Work! Hope that's at dog @9:32

meisterunner
Автор

Is there a backstory to your common use of "timmy" as a variable name for setInterval? Is that a common practice I just haven't seen before? I found myself wondering about this, so I thought I might as well ask. :-)

bmehder
Автор

Steve, awesome video! Thanks for the great content you provide, but 2 questions emerged. Could you please help me to figure this out?


1st: Since you are fetching data from the server before checking local storage, doesn't that mean that the client will still fetch data from the server instead of fetching it from cache? If so, you are consuming bandwidth and countering the entire point of using cache, or not?


2nd: Wouldn't it be appropriate to define DATETIMEOUT as 30000 as per seconds base, once you are comparing it with a timestamp?

dinaiswatching
Автор

Thanks Hossain.
Can you please make a video about CacheStorage api handling with js?

gargximran