तेज़ वेब साइट के लिए जावास्क्रिप्ट को ऑप्टिमाइज़ करें
अपनी फ़ाइल की सामग्री को बाईं ओर के बॉक्स में कॉपी करें, और आपको दूसरे में अनुकूलित स्क्रिप्ट लौटा दी जाएगी। विकास से जीने के लिए संक्रमण के लिए बिल्कुल सही।
About
This tool is designed to bring down the size of JavaScript files, and while this will help, it can't make decisions like what your file includes and where it should be within your site, and how you use it.
Initial coding had reductions of between 5% and 15% dependent on code styling, however in our latest update we have increased it to up to almost 25%.
We've been using this for a number of years internally, so have confidence in it, however if you find it breaks your code then please feel free to contact us.
Test JavaScript
function nextElSibling(el) {
if (el.nextSibling)
do { el = el.nextSibling } while (el && el.nodeType !== 1);
return el;
}
function prevElSibling(el) {
if (el.previousSibling)
do { el = el.previousSibling } while (el && el.nodeType !== 1);
return el;
}
function upElSibling(el) {
do { el = el.parentNode; } while (el.nodeType !== 1);
return el;
}
function upElSiblingA(el) {
try {
do { el = el.parentNode; } while (el.tagName.toLowerCase() !== "a");
return el;
}
catch (err) {
return el;
}
}
Return JavaScript
function nextElSibling(el){
if(el.nextSibling)
do {el=el.nextSibling }while (el && el.nodeType !== 1);return el;}function prevElSibling(el){
if(el.previousSibling)
do {el=el.previousSibling }while (el && el.nodeType !== 1);return el;}function upElSibling(el){
do {el=el.parentNode;}while (el.nodeType !== 1);return el;}function upElSiblingA(el){
try {
do {el=el.parentNode;}while (el.tagName.toLowerCase()!== "a");return el;}catch (err){
return el;}}