tabliss icon indicating copy to clipboard operation
tabliss copied to clipboard

Refreshing new tab will cause image reload

Open ddarfantasy opened this issue 2 years ago • 8 comments

On a restricted internet occation, if I refresh the tab, the cache would be gone and the image won't load, which isn't a problem present in older versions. The cache loss will definitely increase unnecessary internet activities and make the experience inferior. Is it an expected behavior, or is there a solution?

ddarfantasy avatar Mar 25 '22 16:03 ddarfantasy

It doesn't seem to trigger everytime, though.

ddarfantasy avatar Mar 25 '22 16:03 ddarfantasy

Hi @ddarfantasy, are you running Unsplash on "A new photo every new tab"?

If so there was a recent fix to the cache that may cause this for you. Essentially some people would complain the "every new tab" setting wouldn't work sometimes, but what was actually happening was Tabliss did not have enough time to download the next image, so it would instead show the previous one again.

If this is the case, changing "every new tab" to say, "every 5 minutes" might alleviate the issue for you. I might consider reverting the previous fix, and maybe replacing it with a warning message explaining why the image is the same?

joelshepherd avatar Mar 26 '22 06:03 joelshepherd

Sorry, but this is not the case. I'm running Unsplash on "A new photo every day".

If so there was a recent fix to the cache that may cause this for you. Essentially some people would complain the "every new tab" setting wouldn't work sometimes, but what was actually happening was Tabliss did not have enough time to download the next image, so it would instead show the previous one again.

I have noticed this exactly, and I think replacing it with a warning is better. Although the image may not reload every time, the current new method will cause an unpleasant black flash everytime after refresh. I think it's worse than showing a previous image.

ddarfantasy avatar Mar 26 '22 08:03 ddarfantasy

Every time you refresh? That really shouldn't happen.

Have you disabled caching in your browser possible? Tabliss used to use a custom cache, but now it uses the standard browser cache for storing the image.

You can check if your cache is working by opening dev tools, going to the network tab, and refreshing Tabliss. You should be able to see the 304 status and "from cache" under the unsplash requests:

image

joelshepherd avatar Mar 26 '22 09:03 joelshepherd

@joelshepherd My mistake. It is cached actually. But it sometimes take a really long time to load the image, sometimes even longer than a second, as is shown in the same dev page from my perspective. (Especially after a cold start of firefox.) And the black screen will sometime last for more than a second. But I think there's not much we can do on this issue?

ddarfantasy avatar Mar 26 '22 11:03 ddarfantasy

Ah I see. I'll experiment a bit and see what I can do.

Do you happen to have low-ish diskspace? Browsers will start deleting cache if they determine your disk space is getting low? Maybe the new cache method has a lower priority that the previous cache method?

joelshepherd avatar Mar 28 '22 07:03 joelshepherd

I have plenty of diskspace, so I don't think it's a problem. But I think my CPU may be a bit slow.

ddarfantasy avatar Mar 28 '22 09:03 ddarfantasy

I might be having the same issue, although I'm seeing this on new tabs, not refreshing a tab--I have the same image as my background, set to change every week. But many times, when I open a new tab, it takes 2-3 seconds to load the background image. I'm on a fast computer with lots of RAM and disk space, with a gigabit internet connection.

canadaduane avatar May 18 '22 17:05 canadaduane