FB ඇයි ?

DooA

Well-known member
  • Jun 22, 2011
    5,202
    773
    113
    ආගිය අතක් නැත
    long-polling ? මොකක්ද බන් ඒ ..පොඩ්ඩක් පැහැදිලි කරපංකෝ අපි වගේ අසරණයන්ට

    ඒ කියන්නේ බන්. උබලා FB එකේ chat කරද්දී යාලුවෝ එවන msg උන්ගේ notification එහෙම එනවනේ උබල page එක refresh නොකර. අන්න එකට උන් use කරන්නේ long-polling. ඒ කියන්නේ background එකෙන් fb server එකට request යනවා. හැබැයි request එක ගිය ගමන් response එක එන්නේ නෑ. response එක එන්නේ උබේ මොකක් හරි update එකක් තිබ්බොත් විතරයි. මේවා වැරදිනම් කව්රුහරි නිවැරදි කරන්න. :(
     

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    48,866
    99,078
    113
    Security considerations

    People often are concerned regarding security of WebSockets. Reality is that it makes little difference or even puts WebSockets as better option. First of all with AJAX there is a higher chance of MITM as each request is new TCP connection and traversing through internet infrastructure. With WebSockets, once it's connected it is far more challenging to intercept in between, with additionally enforced frame masking when data is streamed from client to server as well as additional compression, that requires more effort to probe data. All modern protocols support both: HTTP and HTTPS (encrypted).
    http://solvedstack.com/questions/ht...lling-vs-ajax-vs-webrtc-vs-server-sent-events