Search

ASP.NET: Access Client Info Server-side

3 min read
1 views

I was playing around with HTTP request headers and for some reason started thinking about how limited information they provide about the requesting browser. All they really provide is the user agent string which provide very little information about the visitors platform, and that's about it. If they also provided screen resolution and available browser window real estate, it would start being useful for other scenarios than we are used to. Then I started thinking about a way to provide ASP.NET web applications with data retrieved from the browser without interfering with the browsing experience. I found that the only way to get client information from JavaScript transferred to server-side variables is to do redirection, but that is not acceptable. Well, at least I thought. It is actually possible to do redirections without the browser registers it in its history so the back button would act as nothing happened. This means that it should be possible to retrieve the information in a way that is totally transparent to the visitor. In other words, the website appear to act 100% as usual. If you don't believe me, read on and I'll tell you how it's done.

That is all there is needed to gain access to the properties of the ClientStats module. Download Comments Tag: Reddit | Furl Bookmark Murdok: Mads Kristensen currently works as a Senior Developer at Traceworks located in Copenhagen, Denmark. Mads graduated from Copenhagen Technical Academy with a multimedia degree in 2003, but has been a professional developer since 2000. His main focus is on ASP.NET but is responsible for Winforms, Windows- and web services in his daily work as well. A true .NET developer with great passion for the simple solution.

http://www.madskristensen.dk/

Suggest a Correction

Found an error or have a suggestion? Let us know and we'll review it.

Share this article

Comments (0)

Please sign in to leave a comment.

No comments yet. Be the first to comment!