Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page.js is generated on stateless pages #1946

Open
fanf opened this issue Mar 28, 2018 · 2 comments
Open

Page.js is generated on stateless pages #1946

fanf opened this issue Mar 28, 2018 · 2 comments
Assignees

Comments

@fanf
Copy link

fanf commented Mar 28, 2018

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>
@Shadowfiend
Copy link
Member

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.

@Shadowfiend
Copy link
Member

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.

@Shadowfiend Shadowfiend self-assigned this Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants