Skip to content Skip to sidebar Skip to footer

Generate Javascript File With Php

My current code I have started writing an API that loads, minifies and returns javascript files into one file using PHP. This is achieved by pointing to a PHP file from a script ta

Solution 1:

Faster as .js yes, but marginally. The reason being that it would be a static file so wouldn't need the processing time PHP will take.

That said there's nothing wrong with feeding JavaScript through PHP like this. You could even come up with caching methods as well to reduce the processing impact.

Post a Comment for "Generate Javascript File With Php"