Getting Data In

How do I reload CSS and JS files despite the browser cache?

matthieumarrast
Explorer

Hello,

I source CSS and JS files in my view, as below:

<form stylesheet="style.css" script="script.js">

But, each time I make modifications, the files are not reloaded (because of browser cache) and our modifications are not visible to the users. How can I do this? Clearing the cache is not an easy action for end users.

I tried

<form stylesheet="style.css?v1.0" script="script.js">

but it does not work.

0 Karma
1 Solution

493669
Super Champion

easiest way is to bump the server-

https://<SH>:8000/en-US/_bump

Click that button. Every click increases the bump, which effectively breaks all caching in the webserver. No need to restart! If you find it doesn't work as expected, run also the debug/refresh endpoint.

 https://<yourSplunk>/debug/refresh

View solution in original post

mstjohn_splunk
Splunk Employee
Splunk Employee

Did the answer below solve your problem? If so, please resolve this post by approving it!
If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!

0 Karma

matthieumarrast
Explorer

Yes. It seems to be ok.

0 Karma

493669
Super Champion

easiest way is to bump the server-

https://<SH>:8000/en-US/_bump

Click that button. Every click increases the bump, which effectively breaks all caching in the webserver. No need to restart! If you find it doesn't work as expected, run also the debug/refresh endpoint.

 https://<yourSplunk>/debug/refresh
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...