import mql from '@microlink/mql' const { data } = await mql('https://microlink.io', { function: '({ page }) => page.evaluate("jQuery.fn.jquery")', meta: false, scripts: [ "https://code.jquery.com/jquery-3.5.0.min.js" ] })
Microlink Function:
How to compress
September 3, 2022 ()
The query parameter function allows you dynamic code execution with remote headless browser access on runtime:
The function body can be pass in plain text, but also multiple compression algorithms are supported.
Brotli
brotli
is a modern and general purpose compression algorithm with a well compression ratio.brotli has a good compression ratio & speed.
Lz-string
lz-string
is designed to be efficient for compressing text.lz-string is lightweight enough to be used for client-side apps.
Gzip
gzip is the predecessor of brotli and it's widely supported.
It's possible to compress using gzip directly in the browser, using
Compression Streams API
.Join the community
All of these improvements or features are community driven: We listen to your feedback and act accordingly.
Whether you are are building a product and you need fancy previews, you’re an indie hacker or simply you like frontend stuff, come chat with us 🙂.