admin管理员组

文章数量:1026989

I'm using some files from CDNJS:

<link
  href=".5.2/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href=".14.0/css/all.min.css"
  rel="stylesheet"
  type="text/css"
/> 
[...] 
<script src=".5.1/jquery.slim.min.js"></script>
<script src=".5.2/js/bootstrap.bundle.min.js"></script>

When using this files I get some errors in the console (safari/MacOS):

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.bundle.min.js.map, line 0)

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.min.css.map, line 0)

I've found out maps are data about the files (is that correct?) Is it possible to fix this or is it a server error?

I'm using some files from CDNJS:

<link
  href="https://cdnjs.cloudflare./ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href="https://cdnjs.cloudflare./ajax/libs/font-awesome/5.14.0/css/all.min.css"
  rel="stylesheet"
  type="text/css"
/> 
[...] 
<script src="https://cdnjs.cloudflare./ajax/libs/jquery/3.5.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare./ajax/libs/twitter-bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>

When using this files I get some errors in the console (safari/MacOS):

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.bundle.min.js.map, line 0)

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.min.css.map, line 0)

I've found out maps are data about the files (is that correct?) Is it possible to fix this or is it a server error?

Share Improve this question asked Aug 30, 2020 at 12:23 MoPaMoMoPaMo 6848 silver badges27 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Your browser debugger detects minimized JavaScript and CSS and is looking for a map file automatically to normalize it, so it is easier to read. A map file is an instruction file for the browser to "unminify" a minimized JavaScript or CSS file, so that on client side, debugging will be easier, without impacting performance.

Normally getting this error won't effect anything. Actually this error is only thrown if the debugger is open, because the debugger itself caused it. Everything will work as expected anyway. You can ignore those errors.

For more information on how this works and how it's used for see "MDN: Use a source map".

I'm using some files from CDNJS:

<link
  href=".5.2/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href=".14.0/css/all.min.css"
  rel="stylesheet"
  type="text/css"
/> 
[...] 
<script src=".5.1/jquery.slim.min.js"></script>
<script src=".5.2/js/bootstrap.bundle.min.js"></script>

When using this files I get some errors in the console (safari/MacOS):

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.bundle.min.js.map, line 0)

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.min.css.map, line 0)

I've found out maps are data about the files (is that correct?) Is it possible to fix this or is it a server error?

I'm using some files from CDNJS:

<link
  href="https://cdnjs.cloudflare./ajax/libs/twitter-bootstrap/4.5.2/css/bootstrap.min.css"
  rel="stylesheet"
/>
<link
  href="https://cdnjs.cloudflare./ajax/libs/font-awesome/5.14.0/css/all.min.css"
  rel="stylesheet"
  type="text/css"
/> 
[...] 
<script src="https://cdnjs.cloudflare./ajax/libs/jquery/3.5.1/jquery.slim.min.js"></script>
<script src="https://cdnjs.cloudflare./ajax/libs/twitter-bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>

When using this files I get some errors in the console (safari/MacOS):

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.bundle.min.js.map, line 0)

[Error] Failed to load resource: the server responded with a status of 404 () (bootstrap.min.css.map, line 0)

I've found out maps are data about the files (is that correct?) Is it possible to fix this or is it a server error?

Share Improve this question asked Aug 30, 2020 at 12:23 MoPaMoMoPaMo 6848 silver badges27 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Your browser debugger detects minimized JavaScript and CSS and is looking for a map file automatically to normalize it, so it is easier to read. A map file is an instruction file for the browser to "unminify" a minimized JavaScript or CSS file, so that on client side, debugging will be easier, without impacting performance.

Normally getting this error won't effect anything. Actually this error is only thrown if the debugger is open, because the debugger itself caused it. Everything will work as expected anyway. You can ignore those errors.

For more information on how this works and how it's used for see "MDN: Use a source map".

本文标签: javascriptError quotfailed to load resource (map)quot when using cdnjsStack Overflow