mwoffliner
mwoffliner copied to clipboard
unnecessary images loaded from wikimedia
@ghost commented on Oct 7, 2020, 7:20 PM UTC:
When I use kiwix-serve on Windows and open any article, I noticed in network monitor or via umatrix that upload.wikimedia.org two images are being loaded, which even if I let them to download, do not appear in article ever, meaning they are useless:
https://upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg
https://upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg
This issue was moved by kelson42 from kiwix/kiwix-desktop#529.
@kelson42 commented on Oct 8, 2020, 5:31 AM UTC:
@NijazM which content is that exactly?
@ghost commented on Oct 8, 2020, 9:20 PM UTC:
wikipedia_en_all_maxi_2020-07.zim
We need to clarify an d then understand why these ones are not rewritten.
@ghost can you please tell which articles were you opening when you saw this problem.
@MananJethwani I recently discovered that if you see an account "ghost" it means the user has deleted their account, so presumably will no longer receive pings...
I confirm the problem. It comes from res/inserted_style.css
. All that file should be removed as this should come from the online version.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
Why is this issue staled? For all max 2021.3, most page contains external link which cause Chrome waiting 20 seconds to fail it.
@zkosk Because we didn't have had the time to do it. This is that simple.
@kelson42 I don't know how the offliner work, maybe adding some code that replace all external links with some builtin resources?
@kelson42 The code is like:
<style data-mw-deduplicate="TemplateStyles:r982806391"> ... url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg") ... </style>
What about build some filter framework into kiwix-serve project, then adding a filter that remove the url or change it to local resource in kiwix-serve.exe can solve any such problems. All the operations are done on the fly when the pages are served by kiwix-serve, having nothing todo with the off-liner which seems to be hard to modify and debug. This also provide the opportunity to improve the experience at any time without waiting for a new version of the zim. The filter can be even configured through config text files then any user can add filter at anytime.
@zkosk The problem is that these files are part of js/css modules and the way how these modules are handled is buggy. The problem is larger than this ticket. I have put the ticket here to fix it here as this is a bug in MWoffliner, nothing to do with Kiwix Serve.
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.
kiwix-serve meanwhile forbids to external resources