Auto Minify Overriding Specific Page Rules 🤔

Hi,
I have some page rules setup for 2 pages, my main landing page and my docs page.
My main 1st page rule for landing page I’ve set Auto Minify for **HTML / CSS / JavaScript**.

On my 2nd page rule for Docs, I’ve set Auto Minify ONLY for **HTML / CSS** yet on this page, it’s applying JavaScript Auto Minify.

Can anyone help me fix this issue? I’ve attached screenshots of my 2 page rules below.
Your help is much appreciated!
Thank you,
Jay

Landing Page - 1st Page Rule

Docs Page - 2nd Page Rule

Page Rules

Here’s a screenshot of it overriding my page rule, look at highlighted area. Since I’m using custom JS imports, I do not want to apply JavaScript Auto Minify to this page because it’s resulting in console errors.

DId you enable Auto Minify globally? Under the Speed tab.

1 Like

Your first Page Rule says that if it doesn’t have ‘www’, to add it.

You won’t ever get to Rule 2 or 3 because they already match Rule #1.

While you’re at it, check your Speed → Optimization to see if you’re already minifying all of that.

1 Like

Hi Guys,
Thanks for your replies, I do have them all checked in Speed => Optimization.
I’ve unchecked them all from this section.

Hey @sdayman,
I’ve changed the links on Page rules as seen below, but now Auto Minify is not being applied at all. :confused:

I’m confused :worried:

First of all, Rules 2 & 3 only apply to an .html file, so the CSS and JS minification isn’t going to occur.

And as far as html minification, it won’t trigger if there are syntax errors.
https://validator.w3.org/nu/?doc=https%3A%2F%2Fwww.arc2d.com%2Findex.html

p.s. I suppose I could have mentioned all this earlier, but I was completely focused on Rule #1 overriding the other two rules and didn’t check the rest.

2 Likes

I personally prefer minifying on my own. I’ve encountered too many odd behaviors using AutoMinify.

1 Like

Since I’m still making edits to my site, my files aren’t in production mode, you’re right it’s better to self manage minification for this. Especially when dealing with custom front-end frameworks, CF’s Auto Minify may not know how to deal with JS minificaiton properly, that’s why I can’t use it on my docs page.

1 Like

Agreed. JS & CSS.

1 Like