[英]how to hide website assets such as js and css files?
I came across the following index.html page in which i didn't find any custom assets, such as js and css files. 我遇到了以下index.html页面,在其中没有找到任何自定义资产,例如js和css文件。 The assets path is as follows
资产路径如下
I am not able to find where we have included assets/css/custom/.css assets/js/custom/.js files. 我找不到包含资产/css/custom/.css资产/js/custom/.js文件的位置。
Is there a way to hide these css and js file from html code? 有没有办法从HTML代码隐藏这些CSS和JS文件?
<!DOCTYPE html>
<html ng-app="App">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Where passion meets potential</title>
</head>
<body>
<!-- start of loading jquery -->
<script src="assets/js/vendor/jquery/jquery.min.js"></script>
<script src="assets/js/vendor/lazyload/lazyload.js"></script>
<!-- Loading angular and angular route via CDN -->
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<script src="//cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<script src="//cdn.firebase.com/libs/angularfire/1.2.0/angularfire.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular-route.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ngStorage/0.3.6/ngStorage.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-filter/0.5.8/angular-filter.min.js"></script>
<!-- Loading Angular Controller -->
<script src="controller.js"></script>
<!-- using lazyload to load our dependencies programatically -->
<script src="assets/js/vendor/lazyload/application-css.js"></script>
<script src="assets/js/vendor/lazyload/application-js.js"></script>
<!-- Main Content -->
<div id="main">
<!-- angular template injection-->
<div ng-view></div>
</div>
<!-- END Content -->
</body>
</html>
Just read the comments. 只需阅读评论。 A library called lazyload is used to load all dependencies, probably from the folders you named.
名为lazyload的库用于加载所有依赖关系,可能是从您命名的文件夹中加载。
<!-- using lazyload to load our dependencies programatically -->
<script src="assets/js/vendor/lazyload/application-css.js"></script>
<script src="assets/js/vendor/lazyload/application-js.js"></script>
I don't know how it works exactly but I assume it will add the lazily loaded files somewhere to the DOM. 我不知道它是如何工作的,但是我认为它将延迟加载的文件添加到DOM中。 The client will always be able to find those resources somehow (eg the network tab of chrome devtools).
客户端将始终能够以某种方式找到那些资源(例如chrome devtools的网络标签)。 The files in the code above will probably contain information about how it works for your project.
上面的代码中的文件可能包含有关其在项目中的工作方式的信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.