I'm using the Ionic framework to build a webapp. I'm developing in chrome at the moment to avoid emulators & devices. The app is very simple - just issues GET and POST requests to a REST server all running locally on my very powerful macbook.
When I reload the page in chrome, it's literally taking 10 seconds to make a GET request to my REST server. This is ridiculous.
The app is very small - only about 8 states/pages. The only thing I've added to the stock ionic is RESTangular.
Is it so slow because I'm using chrome or does this indicate a major error? The chrome dev tools show that the ionic.bundle.min.js sits in a waiting state for 10 seconds. It's not my server that's at fault because log messages are displayed when there's a request, and nothing happens for around 10 seconds.
The problem was I had set a default header on the $http object with:
$http.defaults.headers.common.Authorization = 'Basic ' + authHeader;
I removed this and now the app is much faster.