3 ms·
If it's a normal page accessed from the public you cannot. The reason is because the client is completely unknown and anonymous to the server. Therefore the s
by austin-cheney 3y ago
If it's a normal page accessed from the public you cannot. The reason is because the client is completely unknown and anonymous to the server. Therefore the server cannot trust or make assumptions upon the security or state of the client.
The best you could hope for is to impose some manner of authentication scheme so that the client and server are known and uniquely identified to each other at each page request irrespective of session. Then and only then are all options on the table.
This becomes not trivial, but easily accomplished, if the browser were requesting the page from a localhost server.