jquery - How to check whether session exists from javascript? -


i have app frontend in javascript (using angularjs , jquery) , backend in java. app has many pages (ng-view).

i need know whether session in backend active or invalidated. based on need decide whether show logout button on page or not.

although have learnt session maintained in browser using session cookies, this , this, concluded have manually set variable values in cookie object create in javascript.

is there way session cookie used communicate server? getting cookie, can perhaps see whether session active or not.

please let me know if interpratation wrong.

you can't check session expire or not in java script using session because if write code this:

if (isset($_session["phpsessid"])) {}

that write on document working can not change value call of javascript. if reload page update session value.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -