Also, if it named .php -- it can't be served by frontend nginx, and caused more load on server And, not cached on client-side. I think, it should be cached by executing and storing result to customize.js, and in browser created tag <script> with src=path_to_customize.js