PHP script to minify js, css & html.
I found that in many cases plugins are badly developed and what we end up with a rather bad HTML/JS/CSS output implying more bandwidth usage. Even if it is not the case of plugins we still have an output things that has a lot of unnecessary characters which increases the output size. It would have been nice if we had:
1) a main PHP file in the root (say index.php) that would generate minified version of the output js, css and html.
2) we can have a developers' version of the same to analyze how good we have coded up.
This will be functionally similar to Symfony's app_dev.php and app.php.
This feature can be incorporated in the 4.0 version of wordpress.
@admin @wordpress: What is "core" supposed to mean? The PHP script will be a part of the core. Can you please move the "idea" to a more appropriate location?
Core means the base code of WordPress. This is in the appropriate section, though it's more plugin territory than anything else. There won't be a developer's version of WordPress, and mini fixation can be done via plugins or server side tools.
Thanks mod. :) There may be plugins but won't it be wonderful if a thing like this is incorporated into WordPress base? WP has incorporated gallery and carousel then why not this? This will make wordpress stand apart. We can have index.php to generate the non-minified developers version of the html as long as WP_DEBUG is not -1. I am developing a version that would help do the same. Lets see what happens. ;)
Sure, but if WordPress did everything it possibly could, it would be enormous and have too many options. Which is the antithesis of two of the goals of WordPress.
WP already minifies all self-included JS and CSS. It doesn't do the 'html' because that's all rendered on the fly, which is why Plugins do this. And not everything can be minified, since we have so many other ways to include js and css (plugins and themes) and not all play well if minified.
RSS feed for this topic
You must log in to post.