Script Compressor

4月 30th, 2008

WordPress プラグインの、Script Compressor を公開しました。
テーマや他のプラグインによって読み込まれるJavaScriptとCSSの圧縮を自動的に行うプラグインです。

ダウンロードはScript Compressor « WordPress Plugins
変更履歴はダウンロードページで見ることができます。

Script Compressor is a WordPress plugin which compresses javascript files and CSS files loaded by the theme or other plugins automatically.

Download it in Script Compressor « WordPress Plugins.
The changelog is available in the download page.

Did you find this information helpful? If you did, consider donating.

関連記事

  1. Greg
    1月 17th, 2009 at 18:02 | #1

    Thank you for the consideration!

    Cheers,
    G.

  2. 2月 7th, 2009 at 13:10 | #2

    I released the version 1.6. Please check it.

  3. 2月 26th, 2009 at 11:29 | #3

    Great plugin! I just can’t seem to figure out how to use the exclude feature, and this plugin seems to interfere with the comment validation plugin. I’ve tried putting in the absolute urls, each on separate lines, in the exclude field, but it doesn’t seem to be working?

  4. 2月 26th, 2009 at 19:01 | #4

    I checked that it works properly.

    The feature does the following to each script tag:
    1. Getting script URL of the script tag which is outputted by other plugins.
    2. Excluding the script file from the compression if URL contains the characters you inputted to the option.

  5. Olivier
    3月 13th, 2009 at 04:56 | #5

    Hey,
    Thank for this great plugin. I tried phpspeedy but it was breaking my website.
    Yours works perfectly improved my Yslow from F to A ;)
    @Chisa, if you want to exclude lets says Jquery form the compression, just put “jquery” without the quote in the field, not the full URL.

  6. 4月 11th, 2009 at 22:45 | #6

    Hi, thanks for this plugin, it’s great. However I have the same problem with this plugin that I do with every plugin which compresses CSS e.g. php_speedy: it always breaks my CSS. I thought it was my Dreamhost server which didn’t allow it to work but now I have another server and it is the same- it just loads without the CSS.

    Also looking at the components with YSlow, it shows that the CSS is not being compressed, while the javascript is. I have done CTRL+F5 many times, emptied the browser cache and nothing works. I have made the cache folder within the plugin writeable, disabled all other plugins but it still does not work. Can you give me any clue as to why it is not working? thanks :)

  7. 4月 13th, 2009 at 16:07 | #7

    @Olivier
    I’m sorry for being late for reply. I’m glad to see your report.

    @Guy
    Please tell me how your CSS is. Is it empty? Does it have 404 error?

  8. 4月 21st, 2009 at 18:54 | #8

    @Regen
    Hi, thanks for the reply- I changed a setting on my server (turned on xcaching) and turned off WP-Supercache and now your plugin is working. Well, it is definitely compressing the javascript but doesn’t seem to be compressing the CSS- this may be due to it not finding the CSS though. Do most themes load the CSS into wp_head?
    I will do some more research into it.

  9. 4月 24th, 2009 at 23:18 | #9

    @Guy
    Which CSS compression method are you using? If you are using “Composed” method, this plugin changes the codes which are output by wp_head. But theme CSS is not in wp_head. So this plugin provide template tags. Please check them or try “Respective” method.

  10. 4月 28th, 2009 at 02:48 | #10

    I am using ‘Respective’ mode- I have tried to add the template tags but I don’t know much about PHP so it ends up breaking the theme. For now I’ll just leave that uncompressed I think.

    I have also noticed an error in my server logs:

    PHP Warning: preg_match() [function.preg-match]: No ending delimiter ‘/’ found in [server_address]/wp-content/plugins/script-compressor/script-compressor.php on line 218, referer: http://www.mysite.com -is this likely to be a genuine bug or a conflict with something else?

  11. 4月 28th, 2009 at 17:30 | #11

    The PHP warning was was my mistake. I released the new version in which this plugin compresses the scripts including theme scripts in the header. So you don’t have to use the template tags in the header. Please check.

  12. Joe Pea
    6月 18th, 2009 at 11:23 | #12

    VERY BAD BUG FOUND!

    When the plug in is deactivated in WP 2.8, it causes all CSS to fail across the entire site. This needs to be fixed! My site is all screwed up now :(

  13. Joe Pea
    6月 18th, 2009 at 11:57 | #13

    –So basically, my website is down. I was disabling Script Compressor to troubleshoot my CSS so that it works when enabled. Currently, there seems to be PHP code left behind after the plug in was deactivated.

    –After deleting the plugin completely, both Admin and my Blog remained with no style. Here’s the screen shots:

    http://bettafootwear.com/tempDELETE/No-style-admin.JPG
    http://bettafootwear.com/tempDELETE/No-style-blog.JPG

    –EVEN AFTER RE-INSTALL of wordpress, the bug persists. What should I do!? This is NOT good! :(

  14. Joe Pea
    6月 18th, 2009 at 12:03 | #14

    Please notify me by email if you read my previous comments :) trusktr[at]gmail[dot]com

  15. Joe Pea
    6月 18th, 2009 at 12:13 | #15

    Oh, and one more thing. When the plugin is re-activated, the CSS for admin control panel and blog works again (except with errors from the compression which is what i wanted to fix originally).

  16. Joe Pea
    6月 18th, 2009 at 12:23 | #16

    Wait, Nevermind! I fixed it! I had to delete the line of code that was added to .htaccess for css compression and then everything returned to normal. Hehe, newbs out there will have some problems :P

  17. 6月 18th, 2009 at 16:26 | #17

    I’m sorry. I noticed that the mod_rewrite codes remain and cause problems when .htaccess is not writable or the plugin is deactivated by removing the directory.
    I’m going to add some explanation to the document.

  18. Tasmany
    7月 1st, 2009 at 03:52 | #18

    Script don’t compress JS and CSS like

    and

    @import url( ‘http:// blablabla /wp-content/plugins/devformatter/devfmt_reset.css?ver=2009.0.1.20′ );

    :(

  19. 7月 6th, 2009 at 18:25 | #19

    OK. In the next version, @import css will be compressed.

  20. 8月 17th, 2009 at 00:42 | #20

    Hi
    nice idea and working fine! thank you very much

    is there a way to compress dashboard scripts, too (?)

  21. 8月 17th, 2009 at 21:39 | #21

    @Sarsura
    There is no way to do so now. Do you want to compress them?

  22. 12月 10th, 2009 at 21:54 | #22

    Thanks Dude,

    Your plugin vastly improved loading time of my site and got me from grade c 77 to grade B 86 points on Yslow (small site/blog) I am grateful!Thanks!

  23. 12月 30th, 2009 at 23:38 | #23

    I use jQuery from google CDN and facebook loader js, but script compressor strip them.
    How to exclude javascript from external ?

  24. 12月 31st, 2009 at 18:11 | #24

    @Ibad
    I’m sorry, that is a bug.
    I am planning to rewrite the plug-in but I am so busy that I cannot do to until April.

Comment pages
  1. 5月 4th, 2008 at 16:34 | #1
  2. 5月 4th, 2008 at 23:08 | #2
  3. 5月 5th, 2008 at 10:05 | #3
  4. 5月 13th, 2008 at 20:11 | #4
  5. 5月 13th, 2008 at 21:09 | #5
  6. 5月 21st, 2008 at 00:50 | #6
  7. 7月 23rd, 2008 at 20:09 | #7
  8. 7月 29th, 2008 at 16:30 | #8
  9. 7月 29th, 2008 at 19:34 | #9
  10. 8月 12th, 2008 at 16:00 | #10
  11. 12月 31st, 2008 at 11:15 | #11
  12. 12月 31st, 2008 at 17:30 | #12
  13. 2月 23rd, 2009 at 18:53 | #13
  14. 3月 9th, 2009 at 09:05 | #14
  15. 4月 13th, 2009 at 18:00 | #15
  16. 6月 11th, 2009 at 15:14 | #16
  17. 7月 6th, 2009 at 18:58 | #17
  18. 8月 12th, 2009 at 05:39 | #18
  19. 9月 12th, 2009 at 07:34 | #19
  20. 10月 20th, 2009 at 06:03 | #20
  21. 10月 20th, 2009 at 06:07 | #21