Number of requests to Greasy Fork

About: Userscript+ : Show Site All UserJS
While I have no issue with the concept of this script, I am concerned with the number of requests this may be causing to Greasy Fork. About 50% of the requests the site handles are for JSON content.

Does this load data from Greasy Fork on every page load the user does? Can you do anything to reduce the number of requests, like only loading it on demand?

Réponses

  • Yes, I have already taken this into consideration,Userscript+ will cache the JSON data of Greasy Fork.

  • So you are loading for example https://greasyfork.org/scripts/by-site/google.com.json the first time the user visits a page on Google.com, then you are caching that for an amount of time and using the data for every page load on Google.com?

    What if instead I provided you a JSON file with each domain and the count of scripts for that domain? You could use and cache that for the "X user scripts per site" feature, then load the full JSON if the user chooses to see what the scripts are? This would greatly reduce the load on the server and on the clients and would not impact functionality.

    Something like:
    {abc.com: 12, bbc.com: 2, cbc.com: 102...}
    There are also privacy implications with how you are doing things as you are essentially reporting to my server every domain the user visits. I don't store that stuff but...
  • @jaeger can you let me know if something like this would work for you? It would go a long way towards ensuring stability of the site.
  • @JasonBarnabe

    I am very sorry for the trouble you are causing. I would like to improve according to your opinion. Please provide relevant API.

  • Done
  • @JasonBarnabe

    In addition, I would like to ask two questions that everyone is more concerned about and hope to get your answers.

    1. Can I get user scripts through subdomains? E.g:/scripts/by-site/gist.github.com

    2.Can my userscript detect if the user has installed a script? In order to provide smarter installation hints, just like greasyfork

  • Thanks for making the change. Already I can see the the number of requests to the script list action is 1/3 of what it was before.

    Currently Greasy Fork only lists domains as TLD+1. If it would be useful to you to change this, please create an issue on https://github.com/JasonBarnabe/greasyfork .

    Detecting if a script is installed depends on whitelisting by the script manager. You can see details at https://github.com/Tampermonkey/tampermonkey/issues/322
Connectez-vous ou Inscrivez-vous pour répondre.