क्या आप अपने WordPress site के Static Resources से Query Strings remove करना चाहते है? WordPress performance improve करने के लिए Query Strings remove करना बहुत आवश्यक है। यहाँ हम आपको बताएँगे How to Remove Query Strings From Static Resources in WordPress अर्थात WordPress site से query strings कैसे delete/remove करें।
What are WordPress Query Strings
आपके साईट पर Query strings वे URLs होते हैं जिनके अंत में special characters जैसे कि “&” and “?” लगे होते है। Query Strings URL example,
/wp-includes/css/dashicons.min.css?ver=4.4.2
यदि आप इन query strings को static resources से remove नहीं करते है, तो ये आपके साईट पर caching issues का कारण बन सकते हैं। कुछ proxy caching servers और CDNs आपकी साईट की static assets को query strings के कारण cache नहीं कर पाते है और यह सीधे आपके website loading speedको affect करता है।
Parameters (query strings) खोजने के लिए आप Google Page Speed, Pingdom Tool or GTmetrix का उपयोग कर सकते हैं।
How To Remove Query Strings from Static Resources हिंदी
WordPress Static Resources से Query Strings remove करने के लिए कई सारे method है। जो इस आर्टिकल में हम आपको बताएँगे, तो चलिए शुरू करते है।
1. W3 Total Cache
यदि आप अपनी साईट पर W3 Total Cache plugin का उपयोग कर रहे हैं, तो query strings को आसानी से remove कर सकते है। सबसे पहले Performance >> Browser Cache पर क्लिक करे और “Remove Query Strings from Static Resources” को check कर दें। इसके बाद Save setting & Purge Cache पर क्लिक करें। ऐसा करते ही आपके से query strings Remove हो जाएगी।
2. Remove query strings from static resources
यदि आप अपनी site में W3 total cache plugin का उपयोग नहीं कर रहे हैं, तो आप किसी remove query strings का उपयोग कर सकते है।Remove query strings from static resources plugin एक easy और lightweight प्लगइन है जो आपके साईट से query strings remove करने में मदद करता है। यह एक plug & play plugin है। Remove query strings from static resources plugin को install and activate करें। यह automatically आपकी site से query strings remove कर देगी। Plugin download करने के लिए यहाँ क्लिक करें।
3. Query Strings Remover
Query Strings Remover आपके static resources जैसे CSS and JavaScript files से Query Strings को remove करता है। यह उपयोग करने में बहुत ही आसान है, बस प्लगइन install और activate करें। इसमें किसी भी प्रकार की configuration की जरूरत नहीं पडती है। Query Strings Remover plugin को Activate करने के बाद cache clear करना न भूलें। यह Google PageSpeed, YSlow, Pingdom और GTmetrix में आपके performance को बेहतर बनाता है।
4. Speed Booster Pack
Speed Booster Pack एक best WordPress plugin है। इसमें site performance improve करने के लिए कई सारे options मौजूद है। query strings remove करने के अलावा और भी बहुत सी चीजें करता है जैसे कि
- Eliminate external render-blocking Javascript and CSS in above-the-fold content.
- Move scripts to the footer
- Load CSS asynchronously
- Minify and inline all CSS styles and move them to the footer
- Change image compression level
- Load javascript files from Google Libraries
- Defer parsing of javascript files
Autoptimize plugin की मदद से
Autoptimize एक speed optimization plugin है जिसका मुख्य लक्ष्य आपकी वेबसाइट से CSS and Javascript files को compress करके website performance को बेहतर बनाना है। इसके अलावा इसकी मदद से आप अपनी साईट से Query Strings भी remove कर सकते है।
सबसे पहले Settings >> Autoptimize >> Extra option पर क्लिक करें। इसके बाद “Removing query strings (or more specificaly the ver parameter) will not improve load time, but might improve performance scores” option को check करें।
5. Code का उपयोग करके
आप अपने function.php file में कुछ function code add करके query strings आसानी से remove कर सकते है। Functions.php file edit करने के लिए Appearance >> Editor पर क्लिक करें। यहाँ अपनी Functions.php file select करें और दिये गए function codes को bottom में add कर दें।
function _remove_script_version( $src ){
$parts = explode( ‘?ver’, $src );
return $parts[0];
}
add_filter( ‘script_loader_src’, ‘_remove_script_version’, 15, 1 );
add_filter( ‘style_loader_src’, ‘_remove_script_version’, 15, 1 );
यदि आप अपनी साईट पर CDN का उपयोग करते है तो query strings को ignore नहीं करें। Remove query strings from static resources को समस्या को आसानी से solve किया जा सकता है और इसे resolved करने के बाद यह निश्चित रूप से आपकी साइट पर positive effect देगा।
आप इस लेख से संबंधित किसी भी प्रकार के प्रश्न या सुझाव के लिए comment कर सकते हैं। अगर यह आर्टिकल आपके लिए helpful साबित हुई है, तो इसे share करना न भूलें!
Bully says
Very nice arrival sir