This service removes legacy/IE JavaScript and optimizes/minifies your JS code for modern usage and best performance.
curl -X POST \
-H "X-License-Key: YOUR-EXAMPLE-KEY-123" \
--data-binary @your-script.js \
https://js-optimizer.quiqqer.com/optimize > optimized.js
<?php
$code = file_get_contents('your-script.js');
$result = file_get_contents('https://js-optimizer.quiqqer.com/optimize', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: text/plain\r\nX-License-Key: YOUR-EXAMPLE-KEY-123\r\n",
'content' => $code
]
]));
file_put_contents('optimized.js', $result);
?>
fetch('https://js-optimizer.quiqqer.com/optimize', {
method: 'POST',
headers: {
'Content-Type': 'text/plain',
'X-License-Key': 'YOUR-EXAMPLE-KEY-123'
},
body: jsCode // jsCode is a string with your JS code
})
.then(res => res.text())
.then(optimized => {
console.log(optimized);
// Do something with optimized JS
});