Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip cache busting from filenames #72

Closed
screamingjungle opened this issue Jul 26, 2019 · 1 comment
Closed

Strip cache busting from filenames #72

screamingjungle opened this issue Jul 26, 2019 · 1 comment

Comments

@screamingjungle
Copy link
Contributor

Inside _scan_files() you can filter out any cachebusting on the files.

for example, some would use /style.css?version=1
this creates an error so you'll want to discard anything after ?

something like:
$filename = $directory . '/' . preg_replace('#\?.*#', '', $file);

You find this again inside _concat_files()
$file_name = $directory . '/' . preg_replace('#\?.*#', '', $file_name);

You should strip all the filenames entered into Minify.

@michalsn
Copy link
Collaborator

Adding any parameters to file names shouldn't take place. This library has an option to do this automatically.

So... in this case, raising an error is a good thing. I like to think that developers are smart people :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants