Laravel 5.3 bootstrap 如何在没有互联网的情况下解释和显示项目
Laravel 5.3 How does bootstrap interpret and display items without internet
我还在学习Laravel 5.3,前几天就开始研究了。我正在关注的一个教程项目使用了 Fontawesome
和 Bootstrap
,其中 bootstrap link 和 fontawesome
link 包含在 <head></head>
标签。
所以我想如果我断开互联网连接,它将无法显示来自 fontawesome
的图标,因为没有库文件被下载并导入到项目中。但令我惊讶的是它仍然能够显示 fontawesome
图标。
那时我想问这个简单的问题,因为我是 Laravel
和网络编程的初学者。 (Java
程序员)
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>@yield('title')</title>
<!-- bootstrap link -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- fontawesome link -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<!-- app.css link -->
<link rel="stylesheet" href="{{ URL::to('css/app.css') }}">
@yield('styles')
</head>
我从 Laravel 5.3
文档中读到一些关于存储 cached
信息的 bootstrap 目录的内容。即使未连接到 Internet,fontawesome
图标仍然显示的原因是缓存吗?
The Bootstrap Directory
The bootstrap directory contains files that bootstrap the framework
and configure autoloading. This directory also houses a cache
directory which contains framework generated files for performance
optimization such as the route and services cache files.
如果对此有任何解释,我将不胜感激,这样我才能更好地理解它是如何工作的。
您的浏览器也有缓存。执行 hard refresh / reload - 在 Chrome 中,您可以通过打开检查器来执行此操作,然后右键单击刷新按钮并单击最适合您的选项。
Describing what is actually going on would be too long for an answer.
很好地描述了正在发生的事情 here。
Google 搜索字词:browser cache
、web browser cache
如果您使用构建系统 (gulp),您很可能会得到一个很大的 *.css
文件,其中包含 bootstrap、超棒的字体定义等
更多信息在 documentation 中。
我还在学习Laravel 5.3,前几天就开始研究了。我正在关注的一个教程项目使用了 Fontawesome
和 Bootstrap
,其中 bootstrap link 和 fontawesome
link 包含在 <head></head>
标签。
所以我想如果我断开互联网连接,它将无法显示来自 fontawesome
的图标,因为没有库文件被下载并导入到项目中。但令我惊讶的是它仍然能够显示 fontawesome
图标。
那时我想问这个简单的问题,因为我是 Laravel
和网络编程的初学者。 (Java
程序员)
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>@yield('title')</title>
<!-- bootstrap link -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- fontawesome link -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<!-- app.css link -->
<link rel="stylesheet" href="{{ URL::to('css/app.css') }}">
@yield('styles')
</head>
我从 Laravel 5.3
文档中读到一些关于存储 cached
信息的 bootstrap 目录的内容。即使未连接到 Internet,fontawesome
图标仍然显示的原因是缓存吗?
The Bootstrap Directory
The bootstrap directory contains files that bootstrap the framework and configure autoloading. This directory also houses a cache directory which contains framework generated files for performance optimization such as the route and services cache files.
如果对此有任何解释,我将不胜感激,这样我才能更好地理解它是如何工作的。
您的浏览器也有缓存。执行 hard refresh / reload - 在 Chrome 中,您可以通过打开检查器来执行此操作,然后右键单击刷新按钮并单击最适合您的选项。
Describing what is actually going on would be too long for an answer.
很好地描述了正在发生的事情 here。
Google 搜索字词:browser cache
、web browser cache
如果您使用构建系统 (gulp),您很可能会得到一个很大的 *.css
文件,其中包含 bootstrap、超棒的字体定义等
更多信息在 documentation 中。