Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So, can I use this to do this:

Render your SPA (different index.html) when a login cookie is set and otherwise render your landing page (yet another index.html)? - Such that that my http://example.com can always be cached (unless it needs to hit the server where the same logic is implemented).

And in general, how do you manage your landing page vs. your SPA?



Maybe I’m not quite understanding what you’re asking, but I think you can do this with client side service workers already.


Yep. At the origin you might serve the SPA as /spa.html and the worker rewrites the URL for people hitting /.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: