Cache busting

1. The classic query string <link rel="stylesheet" href="/style.css?ver=20180207"> This is the most basic form of cache busting. It works well for manually created assets but it’s a pain to remember, plus it can have some issues.


This content originally appeared on Welcome to my blog on Trys Mudford and was authored by Welcome to my blog on Trys Mudford

1. The classic query string <link rel="stylesheet" href="/style.css?ver=20180207"> This is the most basic form of cache busting. It works well for manually created assets but it’s a pain to remember, plus it can have some issues. 2. The better URL # .htaccess # Version control scripts - https://adactio.com/journal/8504 <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)\.([0-9]*)\.(min.js|js|css)$ $1.$3 [L] </IfModule><link rel="stylesheet" href="/style.20180207.css"> You keep your filenames clean but perform a rewrite for requests so: style.


This content originally appeared on Welcome to my blog on Trys Mudford and was authored by Welcome to my blog on Trys Mudford


Print Share Comment Cite Upload Translate Updates
APA

Welcome to my blog on Trys Mudford | Sciencx (2018-02-07T00:00:00+00:00) Cache busting. Retrieved from https://www.scien.cx/2018/02/07/cache-busting/

MLA
" » Cache busting." Welcome to my blog on Trys Mudford | Sciencx - Wednesday February 7, 2018, https://www.scien.cx/2018/02/07/cache-busting/
HARVARD
Welcome to my blog on Trys Mudford | Sciencx Wednesday February 7, 2018 » Cache busting., viewed ,<https://www.scien.cx/2018/02/07/cache-busting/>
VANCOUVER
Welcome to my blog on Trys Mudford | Sciencx - » Cache busting. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2018/02/07/cache-busting/
CHICAGO
" » Cache busting." Welcome to my blog on Trys Mudford | Sciencx - Accessed . https://www.scien.cx/2018/02/07/cache-busting/
IEEE
" » Cache busting." Welcome to my blog on Trys Mudford | Sciencx [Online]. Available: https://www.scien.cx/2018/02/07/cache-busting/. [Accessed: ]
rf:citation
» Cache busting | Welcome to my blog on Trys Mudford | Sciencx | https://www.scien.cx/2018/02/07/cache-busting/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.