mod-audio / mod-sdk

SDK to implement the MOD gui interface
GNU General Public License v3.0
34 stars 16 forks source link

Reloading Icon tab does not update HTML/CSS #6

Open lazzarello opened 6 years ago

lazzarello commented 6 years ago

The text on the Icon tab states

This interface was rendered based on the LV2 TTL files. Every time you reload this page, proper bundle will be parsed and the layout rendered again.

When I change the CSS or HTML then save/reload that page, the plugin UI does not update with my changes. If I restart the python server, close the browser tab and open a new one, the UI is updated with my changes.

brummer10 commented 5 years ago

I run in the same issue, and found it's because the static file cache settings. Disable the file caching solved the issue and didn't make it really slower. could be done by replace line 135 in webserver.py in function set_extra_headers (in latest git)

self.set_header("Cache-Control", "public, max-age=31536000") with self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')

leogermani commented 5 years ago

If you use the {{{cns}}} wildcard in your HTML and CSS I think you should not have issues with cache.

Check https://wiki.moddevices.com/wiki/Creating_the_GUI and let me know.

I only have issues with cache when I actually deploy the plugin to MOD Duo and want to update it inside the device

brummer10 commented 5 years ago

If you use the {{{cns}}} wildcard in your HTML and CSS I think you should not have issues with cache.

Oh I do. But only the icon view updated accordingly. As well the screenshot and thumbnail in the LV2 folder been updated, but the screenshot view in my browser didn't. When you rework the background png for example, did it update in the browser view for you?

Given that it is a development tool, were you develop/check interfaces, it makes no sense to cache the images in the browser cache. must-revalidate makes much more sense for a flawless workflow.

I only have issues with cache when I actually deploy the plugin to MOD Duo and want to update it inside the device

I never use the deploy function from the SDK, usually do it with curl. But I know that you need to increase the v2:minorVersion in the ttl to update a plug on the MOD. Otherwise you'll stuck with the old version.