apache / incubator-pagespeed-mod

Apache module for rewriting web pages to reduce latency and bandwidth.
http://modpagespeed.com
Apache License 2.0
696 stars 158 forks source link

[Question] Is already minified JS/CSS reprocessed? #1952

Open BarbzYHOOL opened 5 years ago

BarbzYHOOL commented 5 years ago

What happens when there is already minified js and CSS, does the module ignore them based on their name "min.js" "min.css" or does it try to reminify them, thus wasting some CPU ??

oschaaf commented 5 years ago

An attempt will be made to improve a resource. Subsequently, if it turns out it wasn't able to do so, that will be remembered via writing an entry into the cache. Subsequent requests will then yield the original version.

There's no stock ignores based on naming conventions. It's not hard to do that yourself though: https://www.modpagespeed.com/doc/restricting_urls

BarbzYHOOL commented 5 years ago

So, for example:

ModPagespeedDisallow "*/*.min.js"
ModPagespeedDisallow "*/*.min.css"

would save some resources, right?

oschaaf commented 5 years ago

Yep!

BarbzYHOOL commented 5 years ago

That's cool, it should be in a FAQ somewhere because when I looked up, I couldn't find anything about it.

Or maybe even an option directly in the conf, no?

oschaaf commented 5 years ago

Well, it's not exactly frequently asked :-) But putting it out there on the site somewhere would surely be helpful. Feel free to propose an addition over at https://github.com/apache/incubator-pagespeed-website/

BarbzYHOOL commented 5 years ago

the repo has no issues open and no code