Asked by:
How does Invoke-WebRequest behave duing requesting a connection?

Question
-
After "Invoke-WebRequest" are executed with specific URL, I would like to know on how the connection is being handled, such as
(Invoke-WebRequest -Uri $url -SessionVariable Y -UseBasicParsing)
1) Connection is still existed for a period of time
2) Connection is disconnected once it is established, just like hand shake
3) Other
Does anyone have any suggestions?
Thanks in advance for any suggestions
Thanks in advance for any suggestions
- Moved by Bill_Stewart Monday, April 30, 2018 9:12 PM Help vampire
Sunday, February 18, 2018 12:48 PM
All replies
-
Web connections are stateless.
A session variable keeps track of connections to the same session.
Why are you asking?
\_(ツ)_/
Sunday, February 18, 2018 1:04 PM -
After requesting a web connection to google, is there any session keep tracking on how long to stay on this page? since the url does not contain any session coding, such as www.google.com&session=jehuieh73yh
$ww = Invoke-WebRequest http://www.google.com
Do you have any suggestions?
Thank you very much for any suggestions (^v^)
Thanks in advance for any suggestions
Sunday, February 18, 2018 1:15 PM -
Every web server site can do it in its own way. By default most sites timeout an inactive session within 2 minutes. Sites can have keep-alive calls.
Google will maintain a session if you are logged in.
This site is not for web questions. Post your info in a forum designed to answer basic end user web questions.
If you want to learn web technology you can start here: http://www.w3schools.com
\_(ツ)_/
Sunday, February 18, 2018 1:19 PM -
Based on following request, is there no session for tracking on this connection? since there is no www.google.com&session=73y8h73hhhde coming with requested URL, would it be correct?
$ww = Invoke-WebRequest http://www.google.com
For web server, if I request a connection again with the same session within 2 mins, then web server know that the established connection is still active, would it be correct?
Do you have any suggestions?
Thank you very much for any suggestions (^v^)Thanks in advance for any suggestions
Sunday, February 18, 2018 1:41 PM