How to clear cache on Safari?Solved

Participant
Discussion
5 months ago

I’m having trouble remotely clearing the Safari cache on non-shared iPads. However, I’ve discovered a potential alternative solution that iOS Safari can execute preference settings when presented with a URL in a specific format. The option to ‘Clear History and Website Data’ under Settings > Safari has its own URL. By loading this URL through an iOS Shortcut created using the Shortcuts app, the Safari cache can be quickly cleared.

Has anyone else had this issue and found a solution?

Replies (3)

Marked SolutionPending Review
Participant
5 months ago
Marked SolutionPending Review

Hey @dylan ,

Can you share how you created the shortcut for clearing cache of safari?

Marked SolutionPending Review
Participant
5 months ago
Marked SolutionPending Review

Sure, here are the steps to create the shortcut:

  1. Open the Shortcuts application on your iPhone (these instructions also apply to iPad).
  2. Tap the “+” icon in the top navigation bar.
  3. Tap “Add Action” → “Web” → “URL”.
  4. Type exactly the following for the URL: prefs:root=SAFARI&path=prefs:root=SAFARI&path=CLEAR_HISTORY_AND_DATA.
  5. Tap “Add Action” → “Apps” on the next view → “Safari”.
  6. Choose “Open URLs”.

Though it’s working in the device end. Can you help me with how to do it remotely?

Marked SolutionPending Review
Participant
5 months ago
Marked SolutionPending Review

Thanks for the information @dylan. I’m not entirely certain if this is what you’re looking for, but you could try creating a shortcut in the Shortcuts app on the iOS device to clear the Safari cache. Once the shortcut is working, you can get its unique URL from the Shortcuts app. Then, prepare the shortcut for deployment using a configuration profile that includes the URL. After deploying the configuration profile, the shortcut should appear on the device’s home screen, ready to be used to clear the Safari cache.