会议上的一个面试问题 [英] one Interview Question on session

查看:92
本文介绍了会议上的一个面试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一次采访中有人问我:
如果我打开一个站点,即使我尚未使用凭据登录,也会为我创建任何会话吗?
如果我从
打开相同的网站怎么办 i.相同的系统,相同的浏览器[使用标签],还会创建更多会话吗?
ii.系统相同,浏览器是否不同?

I was asked in an interview:
If I open a site,will there be any session created for me,even if I have not logged in using credentials?
What if I opened the same site from
i.same system,same browser[using tab],will there be any more session created?
ii.same system,diff browser?
where will this session be stored?

推荐答案

avishekrc写道:
avishekrc wrote:

如果我打开一个站点,即使我没有使用凭据登录也可以为我创建任何会话吗?

If I open a site,will there be any session created for me,even if I have not logged in using credentials?



是的,打开网站后便立即创建了会话.




Yes the session gets created as soon as you open the site.


avishekrc写道:
avishekrc wrote:

.相同的系统,相同的浏览器[使用选项卡],还会创建更多会话吗?

.same system,same browser[using tab],will there be any more session created?


无论您是在选项卡中打开会话,还是在同一浏览器的不同实例中打开,所有浏览器都共享同一会话.


All the browsers share the same session whether you are opening it in tab or even different instance of the same browser.

avishekrc写道:
avishekrc wrote:

ii.同一系统,差异浏览器吗?

ii.same system,diff browser?


如果使用其他浏览器,则会创建一个新会话.


If you are using the different browser, then a new session would be created.

avishekrc写道:
avishekrc wrote:

该会话将存储在哪里?



会话值存储在Web服务器上,这是唯一存储在客户端系统上的cookie上的sessionid.

这是您的问题吗?



The session values are stored at webserver the only thing sessionid that is stored on cookies on client system.

Is this clarify your question.


这篇关于会议上的一个面试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆