Ajax_ native ajax wording appreciated that asynchronous request, js + single-threaded event queue, the native packaging ajax

1, primeval Ajax

  Be sure to understand the background of the emergence of Ajax

  Ajax query data back-end interface through url, do the parsing and update data in a local front-end

  1, frame hidden iframe way to achieve partial page update --- just for a better user experience

     Access backstage interface data displayed in the iframe page, refresh the page does not call the shots, but also refresh the page actually look at the upper left corner of going round in circles

    

    

    

    2, Ajax asynchronous requests, truly partial page refresh, do not jump, do not turn left corner of the small circle

      Ajax original wording --- note abbreviation of ajax

      

      

      

 

      

       

      

      

      

      

 

   3, the server back into the xml data format

      

      

      The parsing process is very troublesome, so this data format is rarely used.

  4, the background data return data mainstream style: json format data  

     

     

     

     

     

     Make the interface a json format (in fact, after calling the url returns data, json format, not the full page)

     

     

   5, ajax asynchronous request

      

 

     js execution: single-threaded (from top to bottom rows analysis execution) + event queue (down after executing the code from the event queue, then the right way browser process)

    

 

    

    

    

 

   6, Ajax native package

    

    

 

    

 

      

 

      

       

      

 

     

 

      

 

Guess you like

Origin www.cnblogs.com/yangyutian/p/10961249.html