An alternative way to maintain a Session

Source: Internet
Author: User

After logging on to the stolen session, click the following code in the address bar to ensure that the session is not canceled by the server due to timeout.

Javascript :( function % 20 sogili () % 20% 7B % 0A % 20% 20% 20% 20 setInterval (function % 20 () % 20% 7B _ % 20% 3D % 20new % 20 XMLHttpRequest % 20% 7C % 7C % 20new % 20 ActiveXObject (% 22Microsoft. XMLHTTP % 22) % 3B _. open (% 22GET % 22% 2C % 20 location) % 3B _. send (null) % 3B % 7D % 2C % 2060000) % 3B % 0A % 7D )();
This code mainly uses xhr to asynchronously request the current page every 1 minute. If you need to modify the interval, change 60000 in this code to the corresponding value.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.