WP syntax highlighting widget syntaxhighlighter cause excessive number of reception js

Problem

Code syntax highlighting in the WordPress plugin,I prefer the syntax highlighter for this,But this plugin will be a problem in the course of,That's it for each language individually write js script,The result was the number of reception load a maximum of 30 js much! Some say this country,For foreign blog for this is simply deadly。

phenomenon

We use a number of related tools,The analysis of the page,Js file path is to find these plugins directorysyntaxhighlighter3/scripts中

Screenshot 2014-05-30 8.53.06 AM

This time we wanted to,There can remove these default settings can be loaded script file,Some way is to use the online plug-in or manually merging them,In fact a temporary solution while reducing the number of script,It has greatly increased the capacity of a single script。Is there a way to make it when you need to load it?

Configurationsyntaxhighlighter plug

Screenshot 2014-05-30 10.26.35 AM

As shown in FIG,We "Load ALL Brushes" to remove the hook,So it will not load all of the default language files

In the actual use of them,It will be based on our labels or add lang statement to choose to load one or more script files,So there is no script highlighting 30+ 10+ expansion in addition to highlighting script appears in front of the problem。

Original article written by LogStudio:R0uter's Blog » WP syntax highlighting widget syntaxhighlighter cause excessive number of reception js

Reproduced Please keep the source and description link:https://www.logcg.com/archives/549.html

About the Author

R0uter

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *