Offline App


I’m developing a Yii application and I’m wondering if I can do something when the internet goes offline so the user can still use my App. Maybe save the info on the cache or something like that.

Can anyone give me some advice or idea in how to do that?