JavaScript-Is there a way for the PHP program to know if the user's browser is running JS successfully?

Source: Internet
Author: User
PHP and JS These two guys are always eight poles can't hit together, one on the server side, one in the foreground.
For security reasons, some "operations" should not continue to run when JS is not executed in the user's foreground.
Can only change the appearance of the style, there is no role, but also can be changed back at the front desk.
Therefore, there is no way to let the PHP program know whether the user browser successfully run JS?

Reply content:

PHP and JS These two guys are always eight poles can't hit together, one on the server side, one in the foreground.
For security reasons, some "operations" should not continue to run when JS is not executed in the user's foreground.
Can only change the appearance of the style, there is no role, but also can be changed back at the front desk.
Therefore, there is no way to let the PHP program know whether the user browser successfully run JS?

Add a hidden iframe, open a detection page, this page add a meta, at a certain time (such as 5 seconds) after the refresh to the notification page. Then the next script lets the current page jump to another page. If the browser allows JS to be executed, it jumps to the 2nd page and does not give a notification.

    
   
       

JS initiates an asynchronous request to the server?

Send an asynchronous request to the backend

  • 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.