Discussions » Greasy Fork Feedback

New rule regarding script update checks

§
Posted: 2017-10-02
Edited: 2017-10-02

New rule regarding script update checks

Today I heard from my hosting provider that last month, the site went over its bandwidth allowance. Looking into this I found some scripts that were excessively checking for updates, resulting in hundreds of gigabytes of daily bandwidth. Looking at the code for these scripts, it appears they checked for updates every time the script executed.

So starting right now, scripts must only check for updates after a reasonable period (1 day?) has passed since the last check. Any script I find making excessive requests will have its update URL blocked until the issue is fixed in its code.

If anyone has any example code on how to correctly perform update checks, that would be useful.

wOxxOmMod
§
Posted: 2017-10-02

BTW, I don't understand why would a script author want to check the update URL manually. A userscript manager addon/extension checks for that automatically.

§
Posted: 2017-10-02

Do all user script managers do that?

wOxxOmMod
§
Posted: 2017-10-02

Tampermonkey and Greasemonkey do, which accounts for 99.999% of all script managers installations, I guess.

§
Posted: 2017-10-03

With this information in mind, I'm happy to disable the auto-update checking from inside my script completely. Thanks wOxxOm :)

Deleted user 6214
§
Posted: 2017-10-03

Tampermonkey and Greasemonkey do, which accounts for 99.999% of all script managers installations, I guess.

Violentmonkey also checks for userscript updates.

§
Posted: 2017-10-06

Guys/Gals, I use some fairly old scripts, it might be years - or never- before the authors remove the update check -- what would we manually need to look for & comment-out to remove the check?

§
Posted: 2017-10-06

Really, it's only a problem for the site if there's a ton of bandwidth being used. If the script's update URL does not appear as one of the top offenders, I will not be proactively doing anything about it.

§
Posted: 2017-11-14

Greasemonkey seems to not have an update check in place at the moment in version 4.0: https://github.com/greasemonkey/greasemonkey/issues/2667

So, sometimes an script internal update check will bring advantages. Also I like to display more information and I am absolutely no fan of silent updates. There was one time where a library used in multiple allowed scripts was hacked. This hack destroyed hundreds of accounts in an online game. In the end the game provider rolled back more than 100 game servers world wide. Thus, I am more a fan of active updates of userscripts. Usually I do this by setting the update url to about:blank and use my script internal updater. As the url is replaced here at Greasy Fork, this will not work, but at least for my privately hosted scripts it is fine.

My update logic can be found here: https://github.com/IkaScripts/IkariamCore/blob/master/source/script/resources/Updater.js

It let's the user decide between different update check intervals (including no check at all) and also provides an option to check manually or hide notifications for specific updates or patch levels.

wOxxOmMod
§
Posted: 2017-11-15
Edited: 2018-09-01

Greasemonkey 4 is an early work-in-progress so its temporary lack of the auto-update feature may be disregarded.

Edit: GM4.7 implemented it.

Post reply

Sign in to post a reply.