framework
framework copied to clipboard
Page.js is generated on stateless pages
Mailing List thread: https://groups.google.com/forum/#!topic/liftweb/nGl82UL6T4k
[Example project] https://github.com/fanf/demo-bug-lift-session
When a page is stateless (for ex with the >> Stateless modifier in Menu), it still get the following code at its end (which force create a session):
<script type="text/javascript" src="/lift/page/F446450137052YRAVO5.js"></script>
Easiest way to deal with this is probably to check for stateful_? and if it's false emit the JS inline instead of as a referenced page.
We also need to provide a way to clear LiftRules.javaScriptSettings completely, whether in stateless or stateful mode. Right now all we can do is return an empty JsObj, but we still emit some Lift JS setup stuff, rather annoyingly, even if autoIncludeAjax and friends are off.