Newbie Question: How do I encode query stings into the url?

It’s highly possible that I’m asking the wrong question; however, i’m trying to make main.min.css?ver=abc123 look like this --> abc123.main.min.css

Is there something I can do differently in the lib/scripts.php file to obtain this result?

I am trying to avoid this error “remove the query string and encode the parameters into the url”

I noticed that the roots.io main site has this configured. How do I achieve this using v6.5?

You would need to do quite a bit of shifting in your Gruntfile.js to get this working successfully and I’m not sure why you would want to. It would also include some tweaking of lib/scripts.php.

Please elaborate on why you want to do this; there may be a more workable solution.

I am trying to avoid this error “remove the query string and encode the parameters into the url”

No clue what that means^

Thank you for your reply.

Sorry, here is the complete error:

“Remove query strings from static resources. Resources with a “?” in the URL are not cached by some proxy caching servers. Remove the query string and encode the parameters into the URL for the following resources”

The minified js and css files are triggering this error. I would like to have these files appear like they do in roots.io source.

“i’m trying to make main.min.css?ver=abc123 look like this --> abc123.main.min.css”

I don’t mid the extra work. Thank you for your time and guidance.

This topic is now invisible. It will no longer be displayed in any topic lists. The only way to access this topic is via direct link.

Same “issue” here. It’s reported by Page Speed. Some proxy servers don’t get the “?” so it’s better to rename the file. I don’t really know how important it is, but until we get an answer, should we get the post still “visible” ? :slight_smile:

1 Like

I think it should be visible as well.

If you look at cfx 1st reply, he said it could be done with some rearranging of the gruntfile and modifications in the lib/scripts file.

I figured it out! Let me know if your interested in the fix.

This topic is now visible. It will be displayed in topic lists.

Awesome, please share :blush: