Real-time display and Temperature Detection of web pages using Ajax technology

Source: Internet
Author: User

Recently, we have been conducting a GPRS remote monitoring experiment. Basic functions are easy to implement. The problem of Real-Time Detection of device status on the web page has not been solved. I did not think of a solution until I learned Ajax myself today. I have recorded several methods used here.

 

Target Board: initi6410

Web server: Boa

Browser: chorme

 

1. Method 1: Write the webpage showing the device status as CGI and use CGI to read the status of each device. Then, add <meta http-equiv =/"Refresh/" content =/"1; url = system_state.cgi/"> at the end of the program to set the refresh mode, in this way, the program can reload the webpage once every one banknote. In this case, it takes a lot of time. If the status is large, it will crash.

 

2. Method 2: Write the webpage showing the device status as CGI, and write a main program to read the status of all devices. The status information is then transmitted through the message queue. Then, use the CGI program to read the status. In this case, it is better than the first one, but if the status is too large, it will crash.

 

3. Method 3: Use ajax to update content locally.

 

 

 

 

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.