how can a web server know all the tabs served by it (for the same session) in the same browser?

by Basile Starynkevitch   Last Updated September 16, 2018 09:05 AM

This is in the context of my bismon program (GPLv3, on github, still unreleased), which is mostly a single-page web application (with a garbage collected DSL in it) which uses the libonion HTTP server library (so bismon is a specialized web server). Most of the HTML + Javascript + C code of bismon is generated (it is a reflexive and bootstrapped DSL). BTW, I am writing a preliminary technical report on it (an early draft of which, very incomplete, is here in fall 2018)

A web server can manage sessions with cookies. So it would create cookie for each session (after some HTML login form has been presented and successfully filled). On the server side, each cookie is associated with session-specific data.

However, the same session can be visible in several tabs (of e.g. a Firefox browser). Just because the end-user would (for example) "Open Link in New Tab" (with the right-button mouse click) on a given existing hyperlink. My web server would then receive new HTTP requests (probably some GET one), but I don't understand well enough all the details of HTTP to understand what (probably which HTTP request header field) is carrying that information.

What motivates my question is garbage collection (of my application, viewed as a multi-tiered application like ocsigen is). Conceptually all of the data both in server and in the browser has to be garbage collected and lives together (of course I know that the web is about distributed & client/server processing). With a single tab it is just keeping appropriate references (to what is displayed by the browser) in the session data (server side). But with additional tabs for the same session things are more complex.

To rephrase my question: what distinguish, in HTTP requests providing from the same browser instance (e.g. the same Firefox process on my Linux desktop) with the same cookie, the various tabs shown by it (to the same web server)?

Related Questions

How to chose a framework?

Updated May 31, 2016 08:02 AM

Looking For Back-end Advice

Updated January 05, 2018 05:05 AM