I am very new to JS world and sply Electron; and am trying to convert a web app to desktop app. In order to do that, I need to try to intercept requests made by web app inside the sandbox.
Reason for intercept is that I want to provide user an offline experience as well.
This is what i need to do:
- Intercept request.
- Check if data is present
- If data is present send it back
- Else, go ahead with service.
- When response is received, save (for future) and return it.
I am in fix between Protocol and Web Request. Protocol seems to be the savior here. However, I would be greatful if someone can explain me what is the fundamental difference between them.