sash / jquery-ajax-progress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery Ajax Progress

Push chunks of data from the backend and handle them in the frontend before the ajax request is actually finished

Example: // In the javascript $ajax({ type: "GET", url: 'example.php', progress: function(update){ // update contains a string of the newly received data console.log(update); }, })

// In example.php

What's the data format? The first line is a separator string. Each chunk of data is fallowed by the separator line. See the helper function defined in yield.php.

For a complete working example checkout the repo and open example.html in your browser.

About

License:MIT License


Languages

Language:HTML 56.8%Language:PHP 43.2%