LPS-51666 Make the server aware of existing shared resources

Hey Iliyan, this is the fix for the SPA issue we worked on last week. 

I've also tested it with Maps and it works. Other than wrapping inside a `noscript` tag, I ended up moving the `script` and `link` elements to the head after flipping the screen, so we wouldn't lose the css on next navigations.

Let me know if you think we can improve this somehow.

Thanks!