#If DebugBuild then
Dim sess as WebSession = Session
Break
#EndIf
You'll notice that I wrapped the variable assignment in an #If DebugBuild pragma statement. In this case, Session is actually a Method which looks up which session is currently active. If calling this method while debugging, you will probably have only one or two sessions to iterate over. On the other hand, if you leave this call in your production code it will have to iterate over all of the active sessions looking for which one is current. The more concurrent sessions you have, the more expensive the call will be in cpu time.
When the debugger comes upon this code, click on the "sess" object and you will see a plethora of information about the connected browser, including:
- Browser Type
- Browser Version
- Client Date/Time
- Cookie Information
- The Current Page
- Hash Tag
- Platform
- Protocol (HTTP vs HTTPS)
- Remote Address
- The Rendering Engine of the browser
This is a great way to gather information about the computers and browsers that are connecting to your app!
1 comment:
#SoGood
Really love u softwares guys
Post a Comment