vendredi 27 mars 2020

After user login, React Native WebView still shows content for logged out users

Say, the website displays "is out" for logged out users and "is in" for logged in users. The website works fine in other browsers (Chrome on PC, Safari on iPhone, etc).

In React Native WebView, if I visit page A before login and see it display "is out", after logging in, page A still displays "is out". Then I go to page B, "is in" is shown, which is correct. But then I log out, and "is in" is still shown, which is wrong again.

I'm not sure what's causing the problem. Is it cache? The site works fine in other browsers, so I guess it is not the site's problem.

If I set ExpiresDefault 'access plus 1 second' in Apache's config file, the issue will be gone. But having no cache will be too slow and too much burden for the server. I normally use ExpiresDefault 'access plus 1 month' and all other browsers work fine with this config. Only React Native WebView have this issue. I don't understand why.

Can anyone enlighten me? Thank you very much!




Aucun commentaire:

Enregistrer un commentaire