Greedy Cache issue

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 891
Joined: 2016-05-15, 05:00
Location: humid upstate NY

Greedy Cache issue

Unread post by gracious1 » 2017-05-03, 04:59

I discovered a peculiar issue in Greedy Cache. This was after some experimentation when my toolbars started unhiding themselves upon restart or the creation of a new window.

When the toolbar button is placed in the Navigation Toolbar, the Status (or Add-ons) Toolbar, or in a custom toolbar, that toolbar will misbehave. For example, if you hide the toolbar, and then restart PM, the toolbar will unhide itself. If you open a new window, the toolbar will also appear even though it was hidden in the parent window.
GreedyCacheButton2.png
GreedyCacheButton2.png (942 Bytes) Viewed 3943 times
It isn't necessary to diasble Greedy Cache; just removing the toolbar button will suffice, although this workaround means you don't get the benefit of turning the extension on and off with a single click.

(If you put the toolbar button in the Menu Toolbar, however, the issue does not occur. This is the only toolbar that appears to be unaffected.)

I was able to reproduce this in a test profile with the default theme and no other extensions enabled. I am running PM 27.3.0 (64-bit) on Ubuntu 14.04.5 .
20 July 1969 🌗 Apollo 11 🌓 "One small step for [a] man, one giant leap for mankind." 🚀

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-05-03, 12:00

All my add-ons that use toolbar buttons always try to unhide the toolbar they are placed in. It works this way for years and you are the first who found it inconvenient. I'm sure such behavior is correct, but I can add a hidden option to disable this for you in Greedy Cache.

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-05-03, 14:20

JustOff wrote:I can add a hidden option to disable this for you in Greedy Cache.
Try greedy-cache-1.1.4b1-pm.xpi, the preference is extensions.greedy-cache.unhideToolbar.

User avatar
gracious1
Keeps coming back
Keeps coming back
Posts: 891
Joined: 2016-05-15, 05:00
Location: humid upstate NY

Re: Greedy Cache issue

Unread post by gracious1 » 2017-05-03, 23:07

JustOff wrote:I can add a hidden option to disable this for you in Greedy Cache.
JustOff wrote:Try greedy-cache-1.1.4b1-pm.xpi, the preference is extensions.greedy-cache.unhideToolbar.
It works! Hooray! :clap: Thank you very much!
20 July 1969 🌗 Apollo 11 🌓 "One small step for [a] man, one giant leap for mankind." 🚀

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-05-05, 12:24

Greedy Cache 1.1.4 has been released.

Latitude

Re: Greedy Cache issue

Unread post by Latitude » 2017-06-20, 17:14

JustOff wrote:Greedy Cache 1.1.4 has been released.
JustOff, does it save & load cache from HTTPS site?

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-06-20, 17:31

Greedy Cache does not save or load anything, it just instructs the browser to load scripts, images and styles from the browser's cache (if they are already there) without asking remote servers (both http and https) about possible changes of these resources.

Latitude

Re: Greedy Cache issue

Unread post by Latitude » 2017-06-21, 02:47

JustOff wrote:Greedy Cache does not save or load anything, it just instructs the browser to load scripts, images and styles from the browser's cache (if they are already there) without asking remote servers (both http and https) about possible changes of these resources.
It could save our data plan/quota, right?

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-06-21, 10:17

The main benefit is the decrease of overall page load time, see screenshots below. But the size of data received from the network is virtually the same, regardless of the results shown by the network monitor, it simply does the wrong calculations in case of cached data.
palemoon_2017-06-21_12-43-25.png
palemoon_2017-06-21_12-44-32.png

User avatar
Massimo_B
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2017-01-06, 08:30

Re: Greedy Cache issue

Unread post by Massimo_B » 2017-06-22, 07:19

Hi, there is only little information about that addon. Does it just always ignore max-age and cache-control for all scripts and pictures? What is the behaviour for refresh (F5) or force refresh (CTRL+F5)?
Isn't that breaking websites with real-time charts or something? After all I'm looking to improve browsing on slow mobile links.

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-06-22, 12:03

Massimo_B wrote:Hi, there is only little information about that addon. Does it just always ignore max-age and cache-control for all scripts and pictures?
By default it does not alter neither Max-age nor Cache-control headers received from remote servers, so the browser as usual uses them to decide when to store data in the cache and how long it should be kept. Greedy Cache just sets LOAD_FROM_CACHE flag for all requests of types TYPE_SCRIPT, TYPE_IMAGE and TYPE_STYLESHEET to force the browser not to try to re-validate the cache objects if they exist.
What is the behaviour for refresh (F5) or force refresh (CTRL+F5)?
Simple refresh requests made by F5 or reload button are also not re-validated, but forced refresh requests (Ctrl+F5) ignore LOAD_FROM_CACHE flag and can still be used to load the updated data (and update the cache).
Isn't that breaking websites with real-time charts or something? After all I'm looking to improve browsing on slow mobile links.
Since all cache control directives received from remote servers are respected this will not break none of sites that properly declare their caching logic.

Aside of that Greedy Cache has an extra option that enforces the caching of images, even if servers did not ask to do so or even not allow it. This can potentially lead to some problems, but in practice this is extremely rare and I personally always turn it on.

User avatar
Massimo_B
Apollo supporter
Apollo supporter
Posts: 34
Joined: 2017-01-06, 08:30

Re: Greedy Cache issue

Unread post by Massimo_B » 2017-06-22, 12:11

That all sounds more like a thing that every browser core should have as option. I remember some while ago there have been options to change the cache usage behaviour which often confused people.
I think enabling Greedy Cache and all options is optimal for me as I can force refresh if I encounter issues.

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-06-22, 12:58

Massimo_B wrote:That all sounds more like a thing that every browser core should have as option.
Actually browsers can't just change their behavior by acting in a way that's against to web standards. There is a fairly new draft that proposes to extend Cache-control header with new attribute immutable to solve this. It was already implemented by Chrome, Firefox and Safari (not by Pale Moon yet) and actively used on Facebook servers. This approach is safer, although Greedy Cache allows to save more. ;)

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Greedy Cache issue

Unread post by Pallid Planetoid » 2017-10-08, 16:54

What does this pref do: extensions.greedy-cache.before?

I was hoping to speed-up my start.me start-page load since it is large and takes a long time but I can't see any difference in load time with the add-on enabled compared to disabled. So I was wondering if this pref would do anything to improve on the load specifically for my start-page (most other pages there is no issue, they all load quick, the only one that takes more time than most is this one page).
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-10-08, 17:54

Pale Moon Rising wrote:What does this pref do: extensions.greedy-cache.before?
It's just a service pref, please don't play with it.
Off-topic:
I was hoping to speed-up my start.me start-page load since
IMHO, start.me is crap and nothing will help with it.

User avatar
badnick
Astronaut
Astronaut
Posts: 670
Joined: 2017-03-23, 19:56

Re: Greedy Cache issue

Unread post by badnick » 2017-10-08, 18:47

The purpose of this addon is somehow in contradiction with what write here ("Turn off the disk cache")
https://wiki.archlinux.org/index.php/Fi ... disk_cache
Windows 10 pro /64 (version 1809)
PM last/64

JustOff

Re: Greedy Cache issue

Unread post by JustOff » 2017-10-08, 18:55

badnick wrote:"Turn off the disk cache"
This is extremely questionable advice, but I'd prefer not to start this discussion here.

User avatar
badnick
Astronaut
Astronaut
Posts: 670
Joined: 2017-03-23, 19:56

Re: Greedy Cache issue

Unread post by badnick » 2017-10-08, 19:12

Sorry, was just an observation, I'm not expert.
Windows 10 pro /64 (version 1809)
PM last/64

User avatar
Pallid Planetoid
Knows the dark side
Knows the dark side
Posts: 4279
Joined: 2015-10-06, 16:59
Location: Los Angeles CA USA

Re: Greedy Cache issue

Unread post by Pallid Planetoid » 2017-10-14, 17:31

JustOff wrote:
Pale Moon Rising wrote:What does this pref do: extensions.greedy-cache.before?
It's just a service pref, please don't play with it.
Off-topic:
I was hoping to speed-up my start.me start-page load since
IMHO, start.me is crap and nothing will help with it.
Off-topic:
Other than the slow load the start.me start-page serves us well (my wife and I) in our case in regards to how we use the Internet as we have well over 1700+ links at my fingertips with start.me of which probably several 100 we might at some point regularly use in a weeks time. So we are willing to put up with the slow load since our start-page provides ~80%+ of what we generally access on the Internet on a weekly basis. If there is another start-page that will provide us with this many links at our fingertips incorporated within 7 scrolling pages we're willing to look at it.
Current Pale Moon(x86) Release | WIN10 | I5 CPU, 1.7 GHz, 6GB RAM, 500GB HD[20GB SSD]
Formerly user Pale Moon Rising - to provide context involving embedded reply threads.
Good judgment comes from experience and a lot of that comes from bad judgment. - Will Rogers
Knowing Pale Moon is indisputably #1 is defined by knowing the totality of browsers. - Pale Moon Rising

fillerup

Re: Greedy Cache issue

Unread post by fillerup » 2017-12-01, 11:37

is it possible to exempt certain sites from Greedy Cache? it's breaking functionality on one particular website i frequent

Locked