Clearing the webkit cache

Is there a way to clear the webkit cache? When I make changes to the website that controls video/audio playback of my plugin, the changes show in Safari but don’t show in Plex. It seems like the javascript file that I’m changing is cached somewhere.



I tried completely deleting the Plex and Plex Media Server folders in Application Support but it didn’t help. Any ideas?





Edit: Is there any reason the webkit in Plex would parse javascript differently than Safari or Chrome?

Hello Mike!

To be sure you get a fresh copy of a webpage or file you can add cacheTime=0 to the HTTP requests in your Python code, like so:


HTTP.Request(url, cacheTime=0).content

or


HTML.ElementFromURL(url, cacheTime=0)


Javascripts and other interactive content is not executed when you retrieve data from a website this way.

If you are working on a site config for a plugin and you need to empty the webkit cache, the easiest way to do this is to quit the Plex Media Server, start Safari and use the "Empty cache" option" to clear out the cache (Safari and PMS share the same cache).


Emptying the cache in Safari didn't help. I was able to fix it (for now) by including the javascript via php instead of linking it to another file, so it definitely seems like there's a problem with caching.

To get it working, I changed this:

<script src="code.js"></script>



to this:

<script type="text/javascript"><? include 'code.js'; ?></script>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.