HI all, I’m working on a pretty large custom page and needed to refresh quite a lot, small changes like usual but having to wait until the page refreshes is a bit of a pain. Wondering if anyone knows how to use JS to refresh the page.
and it sends a
frappe.call request to
which returns the updated content, which is awesome, but just doesn’t run it. Seems to run the already downloaded version, anyone have any ideas?
Update for others, I’ve figured out how to refresh the JS, just not the template.
If you want to refresh your JS do the following:
Unfortunately that won’t update the displayed page, the
frappe.templates object is updated however it just doesn’t run refreshing the displayed content.
Apparently the templates themselves are cached, both in the form they are received by the pageview request, and the compiled versions of themselves.
I can verify this works for me!!! Good luck everyone!
var pagename = 'xxxx', template_name = 'xxxx'
This has saved me a lot of time waiting for page refreshes already, rather than waiting 20 seconds each time, it now runs in about 1 second.
Hey Mark, this problem is not unique to pages, it also happens in regular doctypes too.
What (business case) is causing you to need to refresh so often? There may be a better way to do it.
Purely for development purposes, no end users will need to refresh as often. Thanks for taking an interest!