Martin k
Martin k

Reputation: 181

bootstrap.min.css loading is very slow if internet is disabled

I just noticed this weird behavior in my Codeigniter 3 site. This is my HTML head from the home page (CI view), of a site I have on a PC wamp server on my local network.

<head>
<meta charset="UTF-8" /> 
<meta name="viewport" content="width=device-width">
<title>Login</title>
<link rel="shortcut icon" href="assets/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="assets/css/login_style.css">
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/dimmscreen.js"></script>   
</head>

I access the site on my local network. When I have an internet connection the site loads instantly. When I unplug the internet from the router, the site is slow and takes about one minute to load.

If I don't try to load the bootstrap.min.css resource and disable internet, the site is also fast. As you can see, all of the resources i use are stored in a local assets folder. I don't need anything from the internet.

So why is bootstrap.min.css causing the slowdown? Is it something connected with the path of the resource?

Upvotes: 0

Views: 1997

Answers (1)

Martin k
Martin k

Reputation: 181

found the problem, bootstrap.min.css was trying to access some fonts on the web

https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,700

Upvotes: 1

Related Questions