I have a php web app. I'd like to know:
There isn't any harm in placing your js in a public directory, since js will still be loaded by the browser in its entirety. Js gets loaded in the dom and can be viewed easily by firebug or any javascript inspector. If you still want to, then you can put it in a private directory, and call it using php. For example:
<script type="text/javascript" src="<?php echo $locationOfJS; ?>"></script>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.