Most voted "session" questions
A session refers to all requests a single client makes to a server. The session is user-specific and for each user a new session is created to accompany that user’s entire request.
Learn more…416 questions
Sort by count of
-
34
votes3
answers30862
viewsWhen to use Stateful or Stateless
I would like to know the difference and when to use. Stateful Stateless
-
31
votes2
answers5413
viewsWork with Session without cookies to prevent session theft
When the session is started, it creates a cookie with PHPSESSID, making the ID public. Knowing that to prevent session hijacking it is best to hide the session ID from other users, then PHPSESSID…
-
26
votes3
answers8116
viewsHow does the session work in web browsers?
A session allows, for example, that I allow the user to remain logged in, saving the information of who is logged in (username, for example). I believe it’s something more elaborate than cookies,…
-
20
votes9
answers6629
viewsWhy is using Sessions not a good alternative to authentication?
I see some discussions about using "Sessions" not being scalable, but as I still don’t have enough experience in large projects to realize this, I don’t know how it works.
-
15
votes2
answers2622
viewsWhat to save in a login session?
I am developing a login system in PHP and Mysql for an administration panel, and I have seen many "secure" login systems where they store in the session the user login or password, that is when they…
-
15
votes2
answers883
viewsWhat is the difference, in practice, between Session and Application?
I’m studying about Tecnologias Web, and during my class there was a topic about concepts involving Session and Application. The technology addressed during the class was C#. I didn’t quite…
-
12
votes4
answers3355
viewsPHP login with permission levels
I have a problem with my code to separate logins. I want when a login with Rank = 1 it redirects to a page, and when the Rank is = 0 go to another. I tried to do it but I didn’t get it because he…
-
12
votes2
answers610
viewsIs it bad to use the standard PHP session engine?
What I understand is that many frameworks, like Codeigniter and Laravel 3 and 4 use their own session storage engine. They don’t use the standard PHP engine (Variable $_SESSION and session_start,…
-
10
votes2
answers433
viewsKeep data between sessions
I have an ASP.Netet MVC project where I file a report that requires quite resource of the machine in question of processing. I have a Action that generates and another that returns the report data…
-
9
votes2
answers10069
viewsWhen and why use session_start?
Certain that, in short, session_start() "starts a new session or summarizes an existing session", but some questions: The function should only be called once, after the login user’s? Why to start a…
-
8
votes1
answer348
viewsCollapse Menu after page refresh with localStorage
How can I close a menu and keep it closed after the refresh of the page using jQuery only? It would be something like at this link. By clicking the button the menu is reduced and remains so even…
-
8
votes2
answers27161
viewsHow to destroy a specific session?
Here’s the thing: I have an application/game that uses sessions to memorize the data that users have chosen. Whenever the user restarts the game I need to reset the information, so was using…
-
8
votes4
answers827
viewsAnother option to use @ in PHP?
I don’t feel very comfortable having to use the @ before some variables and sessions when making conditions, to avoid error of Unexpected Index which happens when the variable or session was not…
-
8
votes3
answers576
viewsSession Limitation to Save Data
I have a query slow in Oracle to list all the accesses of a user, so I thought to record the result in a Session, the average of records returned is 600, it’s too much for a Session? Would there be…
-
8
votes4
answers2145
viewsWhat technique do I use to keep a form field completed or selected after $_POST[]?
I am developing a real estate system and would like to ask how I can keep the data of a form such as inputs, selects and checkbox selected after giving a $_POST on the form. I don’t know how to…
-
8
votes1
answer558
viewsIs it possible to define a connection pool for each user of an oracle database?
I searched the oracle documentation and only find ways to change this image, but nothing about creating another. Does anyone there know if it is possible what I am ordering? And how to proceed?…
-
7
votes2
answers2701
viewsWhich is more secure: Session or cookie?
Thinking about security guard, what is the best option to keep the user logged in an ASP.NET MVC application, the cookie or the Session?
-
7
votes2
answers824
viewsHow to save two variables from a JS in php session?
I would like to know if there is a way to save these two following variables. Follows the code: <script type="text/javascript"> function opcao() { $(document).ready(function() { var empresa =…
-
7
votes1
answer803
viewsHow can a WEB application that uses Oauth for authentication manage the user session?
Usually sessions are used to keep data of a particular user after they have logged into the WEB application, and it is the WEB application that is responsible for controlling and managing that data…
-
6
votes1
answer322
viewsProblem creating "Zend_session"
I’m trying to create a session on Zend as follows: if (isset($_POST['login'])) { Zend_Session::start(); $session = new Zend_Session_Namespace(); $login = explode('-', $_POST['login']); $codigo =…
-
6
votes1
answer5794
viewsHow to use MVC 4 session with C#?
My scenario is as follows. I have an MVC 4 application. In my controller I check the logged in user and password. (I think) I put the user data in a session after the data is checked and correct. My…
-
6
votes1
answer4629
viewsOption "keep connected" / "remember me" on login screens
I am implementing a login screen and my client asked to add a checkbox "Keep logged in" below the login credentials. Okay, adding is easy. But what is the correct behavior for this feature? Is there…
-
6
votes2
answers1493
viewsShare the same Session on Different Domains on the same Server
You can share the same session between different domains on the same server? If possible, what to do to achieve such a feat?
-
6
votes2
answers2271
viewsIs working with Session safe?
Example, if I create a session session_start(); $_SESSION['nome'] = $nome; #valor pegado anteriormente. The end user can view and(or) edit the data contained in it?…
-
6
votes0
answers828
viewsHow to control a web application session in different browser tabs?
I am developing a web application and using server session to control access to the application, this session should be terminated when the user logs off the application, when to close all tabs of…
-
6
votes2
answers4341
viewsWhat is the best way to log in with Angularjs
In an app using Angularjs and Ionic, what’s the best way to authenticate in an API? I log in to all screens or use some session mechanism? I imagine that authenticating all controllers may consume…
-
6
votes2
answers2164
viewsDifferent session in browser tabs
I’m having problems with a system session. What happens is this: I opened the browser, downloaded the system URL and logged in. At this point the "X" session is created. I opened a new browser tab,…
-
6
votes2
answers984
viewsCodeigniter session expiring after an action
I made an administrative panel using CodeIgniter and every time the session is expiring, thus redirecting to the login screen. Every time for example, that I edit a category, after edited and click…
-
6
votes1
answer198
viewsHow do sessions work at HTTP level?
I came across this question recently and didn’t find much about it in web. I’m used to working (and reading) on Session in PHP, but I never stopped to think what they’d be like HTTP, someone would…
-
6
votes3
answers810
viewsRecord Javascript session using cookie and button
I set up a banner, where I need that when the user enters the site and clicks on the GOT IT button it disappears and when the user re-enters the site or loads another link no longer appears.…
-
6
votes2
answers967
viewsWhat happens to a SESSION when it expires in PHP or refreshes the page?
What happens when Session time expires ? (This time is usually 24 minutes by default). Example: When logging in we set the credentials of a particular user on $_SESSION, with the data resulting from…
-
5
votes1
answer751
viewsPrevention Session Hijacking
I know that to prevent this type of attack we must use session_regenerate_id(), mainly before logging in. My question is whether to delete the previous session by passing a true as parameter? I…
-
5
votes2
answers458
viewsHow do I move the A context session to B context within Tomcat 05
Try two applications made in Java using Tomcat 6 and are in different contexts but one interacts with the other, by being integrated, I need one to be able to pass their session to the other…
-
5
votes1
answer325
viewsHow to work with Séssions at Silex
Good night, I have a question about how to include, change and delete data in the Silex Session. Its API documentation is very simple and without explanation. Is the following: I need to create a…
-
5
votes1
answer7442
viewsWarning when trying session_start(); PHP
Does anyone know what this Warning might be? Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at *caminho*) in *caminho* on…
-
5
votes3
answers626
viewsHow does php guarantee a single session_id?
Which algorithm used to secure a single session_id()? I wanted to know what the creation and verification is like to ensure that such an ID does not collide with an existing one? I need to create…
-
5
votes1
answer357
viewsHow to manage Session with Session in C# desktop and non-web applications?
I can’t find an example of using the Session object for desktop applications, all I find are for applications made in C# for the web with Asp, etc. Does anyone know how to check if a user is…
-
5
votes2
answers2851
viewsCheck if user closed browser
Would there be a way for me to know when a user closes the browser and, before closing, record in the bank that their session is inactive? Or, how can I make some external program that monitors if…
-
5
votes1
answer718
viewsHow to destroy a Session in java?
To invalidate a session, my teacher passed the following code: HttpSession session = request.getSession(false); if (session!=null){ session.invalidate(); } But after the logout, when I click Back in…
-
5
votes1
answer1985
viewsProblem using $_SESSION in PHP 7.1.10
I have two servers running PHP, one in version 5.4.45 and another 7.1.10. When running the files below at the same url, only the older version of PHP displays the values of the "test" session. In…
-
5
votes1
answer137
viewsHow does the request session work?
An idea arose among the developers to use the standard of Session per request - Session by request. Researching on the subject, I found some topics in the OS that generally said that the indication…
-
4
votes3
answers3315
viewsPHP session expires before time
I have a problem with a session time in PHP with Codeigniter. I was using the sessions in the IC and with so many problems I decided to look for a solution to use native sessions with the IC and at…
-
4
votes1
answer5307
viewsHow to work a secure session in PHP using cookies so that the session does not expire when you close your browser?
In PHP, I usually work on user authentication in a restricted area using the variable $_SESSION, but I want to change this method to cookies so that the session does not end when closing the…
-
4
votes0
answers462
viewsDjango Session timer Countdown
I have it on my login screen: SESSION_COOKIE_AGE = 1200 # 20 minutos and would like to show the remaining time on my template. Someone knows a good middleware or package for Django that adds a time…
-
4
votes2
answers2215
views -
4
votes1
answer357
viewsHow to force login after running the application?
My scenario is this:: After authentication with Active Directory, the user who logged in is saved to a Session [HttpPost] public ActionResult Login(LoginModel model, string returnUrl) { if…
-
4
votes1
answer264
viewsManage variables with PHP session
I need to take the value of an input text to store it and use it on another page that opens automatically (popup) when the Send button of the form is pressed. He can do this, but what’s happening is…
-
4
votes2
answers435
viewsPHP logout with Codeigniter
I am having a problem in logout of my system, it until it is logging out correctly and destroying the sessions, but if the user clicks the back button of the browser it goes back to the previous…
-
4
votes1
answer1642
viewsProblem with Session and Nodejs
I’m creating a chat with Node and Session, but I have the following problem: the user identifies and enters the room until then everything right. I am testing on 2 different computers. When I give a…
-
4
votes2
answers730
viewsASP.NET MVC session
Staff I have a controller where Seto two session keys and that capture those key anywhere in the application. (other controller, or a view). The controller is like this: [HttpGet] public…