I am changing a JavaScript file, but it is not showing up in the browser. I cleared browser cache, I purged the cache through wp-admin, I removed the deflate code from .htaccess, but still it doesn't show up.
themes/soundwave/js/prettyPhoto.js?ver=4.2.3
when I add any other number in the ver for example, in the url if I type:
themes/soundwave/js/prettyPhoto.js?ver=4.2.3.1
the change is shown.
During development, you could avoid the hassle of clearing the browser cache by passing a dynamic variable as the file's version when you enqueue it. For instance, the current time.
wp_enqueue_script( 'prettyPhoto', 'prettyPhoto.js', array(), date("h:i:s") );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With