In the controller, the JSTest action is:
public function actionJSTest()
Any reason the call to the controller action from JS doesn’t setState but calling setState during normal processing of any controller action does? I was guessing the session data is available to the app anytime any controller action is called.
Edit - I should mention that the user has already authenticated at the time JSTest is called.
I took out the redirect after the JSTest action runs and it is in fact setting the JS flag to 1. It loses it after the redirect for some reason, like the session is not the same. I know there are issues with secure and insecure sessions, but the variable is being set after login, in an open session for use in other non-SSL pages.
For whatever reason, the variable does not persist, but other session variables I assign during login (in UserIdentity) are persistent. What’s the difference?
I had to add an extra step and renderPartial a page with a noscript refresh and a regular script block with the ajax call. It gives about a half second of white screen between login and initial authenticated page but at least I have a state variable I can branch with to render either html only or js-enabled widgets.