js/css updating when making a plugin

I’m relatively new to writing my own plugins and there’s something I can’t figure out and can’t seem to find an answer anywhere. Apologies if this seems obvious.

My plugin has js and css files that are called as so:

echo ‘<link rel=”stylesheet” type=”text/css” href=”‘.plugin_dir_url( __FILE__ ) .’treatment-slider-9.css”/>’;

echo ‘<script type=”text/javascript” src=”‘.plugin_dir_url( __FILE__ ) .’auto-seo-scroller-16.js”></script>’;

Each time I update the files, I’ve found I’m having to rename it and call the new file instead as the updates are not reflected in on the site.

I’m not using any caching plugins and it seems the same across browsers, in incognito, etc.

Read more here:: js/css updating when making a plugin

Leave a Reply

Your email address will not be published. Required fields are marked *