Possible to load without caching? #588
-
When using different images with the same name our browsers cache the image meaning the user has to update the page without cache to see their actual image. Is there a way to prevent this? Could there be a parameter to change in |
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Mar 21, 2023
Replies: 1 comment 1 reply
-
Sure, you can do that. One common approach is to add some dummy argument to the image source: image = ui.image('https://picsum.photos/200/300.jpg').classes('w-40')
ui.button('Update').on('click', lambda: image.set_source(f'https://picsum.photos/200/300.jpg?t={time.time()}')) See https://stackoverflow.com/a/729623/3419103 for a more detailed explanation. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
2000Nic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, you can do that. One common approach is to add some dummy argument to the image source:
See https://stackoverflow.com/a/729623/3419103 for a more detailed explanation.