0

I have a personal SPA running Vue, which uses a library (lets call it foo). foo download a javascript file called bar.js and then execute it. Everything works as expected, but in bar.js there is an https call (https://fixed-domain/fixed-param) which slows down my SPA significantly. I've tested with uBlock Origin extension that simply blocking the call would solve my problem.

So, is there a way to block that https call from my Vue app? I've try reading the source code of uBlock but it is too complicated for me to re-implement it.

ThienLD
  • 741
  • 4
  • 14
  • 2
    Best option would be to ask the library maintainers to add an option to prevent such downloads, possibly implementing it yourself. Other options are to fork the library and remove it yourself, or to patch the function that results in the external call to block it. – CertainPerformance Jul 23 '21 at 03:36
  • @CertainPerformance It's a mapping library so implement it myself is very difficult, and the content of the js file get updated regularly (the https call stay the same), that's why I'm looking for a way to block the call – ThienLD Jul 23 '21 at 04:22
  • Does this answer your question? [How to intercept all AJAX requests made by different JS libraries](https://stackoverflow.com/questions/25335648/how-to-intercept-all-ajax-requests-made-by-different-js-libraries) – Michal Levý Jul 23 '21 at 07:18

0 Answers0