Make non-minified js not accessible | Community
Skip to main content
Level 4
October 16, 2015
Solved

Make non-minified js not accessible

  • October 16, 2015
  • 3 replies
  • 1580 views

Hello!

Is it somehow possible to make them not accessible in production environments? What's the best solution?

- Delete the non-minified version of the js scripts?

- Add a rule at dispatcher level that blocks js files requests not containing "min" in the URL?

 

Thank you!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kunal_Gaba_

You should not delete the non-minified JS versions as they will be needed by the client library manager to build the minified versions. So, the recommended option is to use dispatcher and block those unnecessary requests. 

3 replies

Kunal_Gaba_
Kunal_Gaba_Accepted solution
October 16, 2015

You should not delete the non-minified JS versions as they will be needed by the client library manager to build the minified versions. So, the recommended option is to use dispatcher and block those unnecessary requests. 

boser87Author
Level 4
October 16, 2015

Thank you very much for your response! I appreciate it. I thought that the non-minified version was actually needed by the minification process. It would be grat to refine the process like this:

- every time there's a new non-minified version, start minification process

- when finished delete the non-minified version

 

But, again, maybe adding the dispatcher rule is the best solution!

Lokesh_Shivalingaiah
Level 10
October 16, 2015

Actually, you can push only minified version to prod