In the onbeforunload event, you want to send a message to your server. the result is sent when it is found on the debugging server .. this is basically the first time. after adding a URL to a webpage, it is basically unsuccessful.
However, if alert is added, which is 100% successfully debugged, And the JS script breakpoint is broken, it will also be 100% successful. so I was wondering which execution was too fast. as a result, ie is disabled if no request is sent. so I want to write a delay loop. no effect .. I suddenly thought of it when I was discussing it with others. XMLHTTP cannot cross-origin. but you can always request your own. in this way, the synchronization method is used. the time delay must be reached. try it at night
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