Category: PHP, javascript

How often have your clients complained to you about not being able to see the new changes you have made to their website? For example, perhaps I’ve just updated the JavaScript and/or CSS files, but my client’s browser is still using their cached version (preventing them from seeing any of the new changes) and they’re confused as to why they’re looking at an older site. The most common way to tackle this issue is to version JavaScript and CSS files.

Happily, there is a way around this that this article will dive into, so without further ado let’s explore two ways to automatically version JavaScript and CSS Files in PHP.

This method is more complex and aims to automatically append the version of each JavaScript and CSS file directly to their name.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners