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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...