为什么我的节点应用程序发送了大量的get请求?

时间:2015-04-30 07:27:34

标签: node.js optimization minify mean-stack

每当我在MEAN应用程序中刷新页面时,运行该应用程序的终端都会输出大量的get请求。这会减慢我的应用程序吗?我可以摆脱其中的一些吗?

GET / 304 113.645 ms - -
GET /assets/stylesheets/css/bootstrap.min.css 304 11.846 ms - -
GET /assets/stylesheets/css/animate.css 304 19.584 ms - -
GET /assets/javascripts/fancybox/jquery.fancybox.css 304 18.081 ms - -
GET /assets/javascripts/owl.carousel/owl.carousel.css 304 17.841 ms - -
GET /assets/javascripts/owl.carousel/owl.theme.css 304 17.657 ms - -
GET /assets/stylesheets/css/style.css 304 16.135 ms - -
GET /assets/stylesheets/css/responsive.css 304 5.011 ms - -
GET /assets/javascripts/jplayer/skin/jukebox/css/jplayer.jukebox.css 304 5.593 ms - -
GET /assets/stylesheets/css/main.css 304 16.013 ms - -
GET /modules/users/css/users.css 304 13.936 ms - -
GET /assets/stylesheets/css/fontawesome/font-awesome.css 304 22.547 ms - -
GET /assets/javascripts/jpreloader/jpreloader.css 304 20.911 ms - -
GET /modules/core/css/core.css 304 13.623 ms - -
GET /assets/stylesheets/css/angular-snap.min.css 304 16.814 ms - -
GET /lib/jquery/dist/jquery.min.js 304 16.388 ms - -
GET /lib/angular/angular.js 304 16.650 ms - -
GET /lib/angular-resource/angular-resource.js 304 13.443 ms - -
GET /lib/angular-cookies/angular-cookies.js 304 28.193 ms - -
GET /lib/angular-animate/angular-animate.js 304 26.984 ms - -
GET /lib/angular-ui-router/release/angular-ui-router.js 304 9.312 ms - -
GET /lib/angular-sanitize/angular-sanitize.js 304 33.775 ms - -
GET /lib/angular-bootstrap/ui-bootstrap-tpls.js 304 33.470 ms - -
GET /lib/angular-ui-utils/ui-utils.js 304 31.331 ms - -
GET /lib/lodash/lodash.min.js 304 17.803 ms - -
GET /lib/angular-touch/angular-touch.js 304 22.445 ms - -
GET /lib/angularjs-dropdown-multiselect/dist/angularjs-dropdown-multiselect.min.js 304 22.940 ms - -
GET /application.js 304 24.288 ms - -
GET /lib/angular-media-player/dist/angular-media-player.js 304 79.501 ms - -
GET /lib/snapjs/snap.min.js 304 70.739 ms - -
GET /config.js 304 83.980 ms - -
GET /modules/accounts/accounts_module.js 304 59.103 ms - -
GET /modules/artistgenres/artistgenres.client.module.js 304 86.947 ms - -
GET /modules/artisttypes/artisttypes.client.module.js 304 37.306 ms - -
GET /modules/artistinterests/artistinterests.client.module.js 304 56.973 ms - -
GET /modules/files/files.client.module.js 304 13.750 ms - -
GET /modules/cities/cities.client.module.js 304 67.768 ms - -
GET /modules/messages/messages.client.module.js 304 69.352 ms - -
GET /modules/profile/profile_module.js 304 16.140 ms - -
GET /modules/users/users.client.module.js 304 18.733 ms - -
GET /modules/core/core.client.module.js 304 83.376 ms - -
GET /modules/accounts/pages/import/import_controller.js 304 79.469 ms - -
GET /modules/home/home_module.js 304 85.333 ms - -
GET /modules/neighborhoods/neighborhoods.client.module.js 304 91.851 ms - -
GET /modules/container/container_module.js 304 24.242 ms - -
GET /modules/accounts/pages/signup/signup_controller.js 304 34.483 ms - -
GET /modules/artistgenres/config/artistgenres.client.config.js 304 41.225 ms - -
GET /modules/accounts/pages/login/login_controller.js 304 42.122 ms - -
GET /modules/artistgenres/config/artistgenres.client.routes.js 304 38.534 ms - -
GET /modules/accounts/pages/apply/apply_controller.js 304 42.867 ms - -
GET /modules/accounts/config/accounts_routes.js 304 45.520 ms - -
GET /modules/artistgenres/services/artistgenres.client.service.js 304 24.213 ms - -
GET /modules/artistinterests/services/artistinterests.client.service.js 304 13.138 ms - -
GET /modules/artistinterests/config/artistinterests.client.config.js 304 61.058 ms - -
GET /modules/artistinterests/config/artistinterests.client.routes.js 304 63.784 ms - -
GET /modules/artistgenres/controllers/artistgenres.client.controller.js 304 62.882 ms - -
GET /modules/artistinterests/controllers/artistinterests.client.controller.js 304 85.128 ms - -
GET /modules/artisttypes/config/artisttypes.client.routes.js 304 49.166 ms - -
GET /modules/cities/controllers/cities.client.controller.js 304 25.185 ms - -
GET /modules/artisttypes/controllers/artisttypes.client.controller.js 304 58.415 ms - -
GET /modules/artisttypes/config/artisttypes.client.config.js 304 57.969 ms - -
GET /modules/artisttypes/services/artisttypes.client.service.js 304 78.072 ms - -
GET /modules/cities/config/cities.client.config.js 304 53.443 ms - -
GET /modules/container/components/footer/footer_controller.js 304 51.342 ms - -
GET /modules/cities/services/cities.client.service.js 304 56.805 ms - -
GET /modules/cities/config/cities.client.routes.js 304 20.592 ms - -
GET /modules/container/components/header/header_controller.js 304 81.731 ms - -
GET /modules/container/main/main_controller.js 304 96.035 ms - -
GET /modules/container/services/nav-links-menu_directive.js 304 96.880 ms - -
GET /modules/container/splash/splash_controller.js 304 103.059 ms - -
GET /modules/container/config/container-layout_routes.js 304 109.850 ms - -
GET /modules/container/services/nav-menu_service.js 304 37.800 ms - -
GET /modules/core/controllers/header.client.controller.js 304 30.084 ms - -
GET /modules/core/config/core.client.routes.js 304 16.356 ms - -
GET /modules/core/controllers/home.client.controller.js 304 29.481 ms - -
GET /modules/core/controllers/browse.client.controller.js 304 48.258 ms - -
GET /modules/files/services/files.client.service.js 304 26.917 ms - -
GET /modules/core/services/modals/standardModal_controller.js 304 85.918 ms - -
GET /modules/core/services/menus.client.service.js 304 62.773 ms - -
GET /modules/files/controllers/files.client.controller.js 304 65.790 ms - -
GET /modules/files/config/files.client.routes.js 304 72.539 ms - -
GET /modules/home/config/home_routes.js 304 26.648 ms - -
GET /modules/home/pages/browse/browse_controller.js 304 29.926 ms - -
GET /modules/messages/config/messages.client.routes.js 304 31.505 ms - -
GET /modules/home/pages/home/home_controller.js 304 47.686 ms - -
GET /modules/messages/controllers/messages.client.controller.js 304 32.608 ms - -
GET /modules/messages/services/messages.client.service.js 304 44.331 ms - -
GET /modules/home/services/toggle-class_directive.js 304 51.178 ms - -
GET /modules/neighborhoods/controllers/neighborhoods.client.controller.js 304 48.002 ms - -
GET /modules/neighborhoods/config/neighborhoods.client.config.js 304 50.873 ms - -
GET /modules/neighborhoods/services/neighborhoods.client.service.js 304 51.807 ms - -
GET /modules/neighborhoods/config/neighborhoods.client.routes.js 304 45.290 ms - -
GET /modules/profile/config/profile_routes.js 304 33.874 ms - -
GET /modules/profile/pages/profile-edit/profile-edit_controller.js 304 36.892 ms - -
GET /modules/users/config/users.client.routes.js 304 54.851 ms - -
GET /modules/profile/pages/profile/profile_controller.js 304 59.528 ms - -
GET /modules/users/config/users.client.config.js 304 61.343 ms - -
GET /modules/users/controllers/admin.client.controller.js 304 23.830 ms - -
GET /modules/users/controllers/settings.client.controller.js 304 31.434 ms - -
GET /modules/users/services/authentication.client.service.js 304 37.039 ms - -
GET /modules/users/controllers/profile.client.controller.js 304 26.199 ms - -
GET /modules/users/controllers/password.client.controller.js 304 26.991 ms - -
GET /modules/users/controllers/authentication.client.controller.js 304 24.791 ms - -
GET /assets/javascripts/jplayer/jquery.jplayer.min.js 304 40.561 ms - -
GET /assets/javascripts/bootstrap.min.js 304 48.406 ms - -
GET /assets/javascripts/angular-snap.min.js 304 57.688 ms - -
GET /assets/javascripts/jpreloader/jpreloader.min.js 304 55.109 ms - -
GET /modules/users/services/users.client.service.js 304 23.405 ms - -
GET /assets/javascripts/jplayer/add-on/jplayer.playlist.min.js 304 15.056 ms - -
GET /assets/javascripts/sly.min.js 304 25.137 ms - -
GET /assets/javascripts/wow/wow.min.js 304 24.524 ms - -
GET /assets/javascripts/jquery.hoverdir.js 304 30.592 ms - -
GET /assets/javascripts/jquery.easing.js 304 27.058 ms - -
GET /assets/javascripts/modernizr.js 304 58.101 ms - -
GET /assets/javascripts/jquery.parallax-1.1.3.js 304 59.616 ms - -
GET /assets/javascripts/masonry.pkgd.min.js 304 24.460 ms - -
GET /assets/javascripts/isotope.pkgd.min.js 304 27.051 ms - -
GET /assets/javascripts/owl.carousel/owl.carousel.min.js 304 54.712 ms - -
GET /assets/javascripts/fancybox/jquery.fancybox.pack.js 304 52.963 ms - -
GET /assets/stylesheets/css/bootstrap.css.map 304 47.436 ms - -
GET /lib/jquery/dist/jquery.min.map 304 49.565 ms - -
GET /modules/container/main/main_template.html 304 171.919 ms - -

此代码所来自的页面至少不需要这些代码中的一半......

1 个答案:

答案 0 :(得分:0)

当您启动服务器并访问主页面时,它将加载所有必要文件,用于所有网页

这是AngularJS的强大功能=页面上不再刷新。想象一下,当您更改到另一个页面时是否需要重新加载所有文件?别担心;)

如果您看到一些不需要的资源,可以在crud配置文件或all.js文件中修改(在MEANJS上)。

链接可以帮助您:

MEANJS(http://meanjs.org/docs.html) MEAN.IO(http://learn.mean.io/