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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...