WP-HTML-Compression

توسط

Combining HTML “minification” with cache and HTTP compression (WP Super Cache, or similar) will cut down your bandwidth and ensure near-immediate content delivery while increasing your Google rankings.

This plugin will compress your HTML by shortening URLs and removing standard comments and whitespace; including new lines, carriage returns, tabs and excess spaces. Most importantly, by ignoring <pre>, <textarea>, <script> and Explorer® conditional comment tags, presentation will not be affected.

  1. Download the plugin (zip file).
  2. Upload and activate the plugin through the “Plugins” menu in the WordPress admin.

سوالات متداول

Installation Instructions

  1. Download the plugin (zip file).
  2. Upload and activate the plugin through the “Plugins” menu in the WordPress admin.

Will this plugin slow down my page load times?

Yes, slightly. While you should be using WP Super Cache anyway, it will correct the issue.

Will Internet Explorer conditional comments be removed?

No.

Is this plugin HTML5-compatible?

Yes.

Will having invalid HTML cause an issue?

Probably, however WordPress does a pretty good job of correcting invalid markup. But honestly, it’s your job to make sure that your code doesn’t suck.

Will this plugin interfere with my hash-based JavaScript navigation?

If the links in your HTML are not hard-coded as hashes without the use of a script, an issue could occur with URL shortening. If so, setting $shorten_urls on line 21 of libs/html-minify.php to false will fix that.

My URLs have the “http:” and/or “https:” stripped??

This is totally fine and actually intentional. It’s standard and will not cause 404s nor get in the way of your SEO, but it will lower file size! You might be interested in reading more about this technique, called scheme-relative URLs.

Why does my compressed HTML have a space between most tags?

To preserve rendered whitespace. One or more line breaks in your markup are rendered as a single space in a web browser. Visual discrepancies would occur if those line breaks were not converted to at least one space.

How do I mark areas that should not be compressed?

While <pre>, <textarea> and <script> tags are automatically left uncompressed, you can designate any code to be exempted from compression. Simply drop your content between a pair of <!--wp-html-compression no compression--> comment tags. A picture is worth a thousand words; so, check the screenshots.

How do I compress the contents of <script> tags?

Until a settings page is created, you’ll have to edit the file from the “Plugins” menu in the WordPress admin. Set $compress_js on line 21 of libs/html-minify.php to true. This is not recommended as this plugin is not yet ready to properly compress inline scripts.

Are you or have you thought of using HTML Tidy?

Since not every WordPress server supports the installation of PHP extensions, this plugin does not currently make use of HTML Tidy. However, future releases may do so.

Will this plugin work for WordPress version x.x.x?

This plugin has only been tested with versions of WordPress as early as 3.2. For anything older, you’ll have to see for yourself.

×
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
نسخه حجم فایل SHA256 تغییرات دانلود
0.5.8 79 کیلوبایت -
دانلود
×
★★★★★
★★★★★
3.4 /5 (14 نظر)

قیمت:

رایگان

نگارش

0.5.8

آخرین انتشار

14 اردیبهشت 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

1,000+

نگارش وردپرس

وردپرس 3.2+

تست شده از نسخه

وردپرس 3.5.2

نگارش PHP

-

نسخه ها

1 نسخه