Clearing browser cache through script

Ashok10
Mega Expert

Hi there,

Is there a way to clear the browser cache through script instead of loading 'cache.do' page manually. Can somebody please help me on this?

Thanks

10 REPLIES 10

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hello Sai,



This url(cache.do) will call a script that flushes your database cache and not browser cache.


Thanks for your reply. Is there anyway to execute cache.do through script?


John VanBruggen
Giga Guru

A quick google search will show that it isn't possible through any traditional methods as it would be a huge security risk.
Can you give us some info on why you want this functionality?   What are you working to accomplish?


Check out my Consultant's Survival Guide
https://youtube.com/watch?v=zYi8KhP9SUk

Hi John,



I have created a home page with different reporting gauges and also with a ui page widget   which display the users list as a drop-down. I have developed logic such that homepage will shows the data depending on the user selected in drop-down.This functionality is working fine only if i clear the cache manually whenever i select the different user.



This is because In our instance we have property Home page render cache enabled,which causing cache.I can not disable this property just for the sake of one homepage(as it is related with performance).So looking for a option of clearing cache using script,when user is on this selected homepage.



Thanks.