Skip to content

Commit

Permalink
Use file hash for minified stylesheet browser caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ShockFromBL committed Aug 4, 2023
1 parent afdf4cf commit b3dc798
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/views/templates/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

<link rel="stylesheet" href="{{ asset('css/normalize.css') }}">
<link rel="stylesheet" href="{{ asset('css/flexboxgrid.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/app.min.css') }}">

@if (file_exists($path = public_path('css/app.min.css')))
<link rel="stylesheet" href="{{ asset('css/app.min.css') }}?crc={{ hash_file('crc32b', $path) }}">
@endif

<meta name="viewport" content="width=device-width, initial-scale=1">

Expand Down

0 comments on commit b3dc798

Please sign in to comment.