Skip to content

Instantly share code, notes, and snippets.

@hemkaran
Created February 28, 2018 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hemkaran/903cd4bdbad9026d7597d51098861921 to your computer and use it in GitHub Desktop.
Save hemkaran/903cd4bdbad9026d7597d51098861921 to your computer and use it in GitHub Desktop.
This file demonstrate using web worker to compress the data at frontend side
// URL of the worker file to load
var workerUrl = '/dist/worker.js';
$.ajax({
url: workerUrl,
dataType: 'text',
success: function (data) {
// data has the file content
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment