Publish a mirror (copy) of a spreadsheet page with real-time changes

I have a spreadsheet page that I would like to publish to my app (as a image format). Is there any way to put it and it will update as the same way graphics update automatically? I tried to publish my spreadsheet page in PDF format online, copy the link and share in glide spreadsheet, but in the app it does not update as modified. I waited for over 1 hour and really nothing has changed.

Images are heavily cached by Glide. You can either modify the url to force it to update, or you can use links that will build pdfs on the fly. Hereā€™s a couple of threads that explain both methods

Filter Tabs/Menu by signed-in user - #9 by Travis_Young

1 Like

In this case, if i put the formula NOW() in F2, whenever it changes, the image will also be updated in cache? Did you know telling me?

It should work as long as something changed in your sheet that would cause now() to update.

1 Like

Donā€™t use NOW for this. Find some value that changes if and only if your chart changes, and use that in the URL.

3 Likes

Hi @Jeff_Hager and @david,

The solution laid down by David (which I am really excited about) doesnā€™t seem to be working for me.

I have an travel expense tracking app with a chart (published in my sheet) in the home tab

When changing the URL in the source cell for the chart from:

https://docs.google.com/spreadsheets/d/e/2PACX-1vQCdFtmJxbYtluhATysBD1OCRyDp-M1aGdb0H3Ch1WyAqQZvuVunkWdRDcEPtlgHf_VTY2ui1R1E31-/pubchart?oid=660519160&format=image

To (where B2 is the total spent so far that increases everytime I submit an expense):

=ā€œhttps://docs.google.com/spreadsheets/d/e/2PACX-1vQCdFtmJxbYtluhATysBD1OCRyDp-M1aGdb0H3Ch1WyAqQZvuVunkWdRDcEPtlgHf_VTY2ui1R1E31-/pubchart?oid=660519160&format=imageā€ & ā€œcachebustā€ & B2

I get the ā€œimage URL canā€™t loadā€ in the space where the chart should be.

Any help would be extremely appreciated!

Shouldnā€™t it be

="https://........=image" & "&cachebust=" & B2
2 Likes

yep, missing the ā€˜&ā€™ before cachebust and the ā€˜=ā€™ after it.

Like too often, the problem is between the screen and the chair :man_facepalming:t4:.

Thanks so much for your help, itā€™s much appreciated!

1 Like

but in my case I am using glide tables does it work the same?

You can build the image link, with a template column for example, and use todays date as the cachebust query parameter. I would probably create another math column first that pulls in the current date and formats it without the current time. Then add that math value as the cachebust in the template column. That way itā€™s not trying to update the image every second and instead updates it every day.

Could you write me an example with glide tables please

I have tried but I think it changes or I do wrong ā€œhttps://googledrive.com/sadsad/ cachebust = 16/092021ā€
in my case I use glide table it was storing the images but I think it doesnā€™t work every time I enter from a cell phone it reloads or maybe refresh if it is in the cache I should just open the photos right

What exactly is the problem you are having and what are you trying to accomplish? The purpose of adding a cachebust parameter to the image url is to ensure that the url changes, so glide is forced to download and re-cache the updated image. This is only really useful if you have an image that changes often, such as a graph thatā€™s constantly updated, but the url for that image doesnā€™t change.

Ok now I understand better, in my case the image almost never changes only if the client requires it, but it is very little, but when I open the cell phone and close it and return open again they load all the photos, I thought they were in the cache and need to reload

1 Like

A glide app is still just a website designed to look and work like an app, but like any website, it will still have to load everything initially. I have the same experience as you. Every time I close the app and open it again, it takes a second or two for the images to show up. The browser is probably caching some of that, so itā€™s possible that itā€™s loading a little bit quicker that it normally would if you opened the app for the very first time. In my case, a lot of my image components and lists are also pointing to an IF column which determines if I need to show an uploaded image or a default image, if one hasnā€™t been uploaded by the user. Since the IF column is a computed column, then it also may be taking a second or two for the IF column to compute and determine which image to show. I really donā€™t fully understand how everything works behind the scenes, maybe it is caching the images to some point, or maybe the cache expires quickly. Itā€™s hard to say, but in my experience, everything loads as fast as I would expect it to load.

Hereā€™s some more info on browser cache and how it works.

2 Likes

ok, I see thanks for share

1 Like