On Tue, Jun 18, 2019 at 12:15:46PM +0200, Andrea Bolognani wrote:
On Tue, 2019-06-18 at 10:39 +0100, Daniel P. Berrangé wrote:
> On Tue, Jun 18, 2019 at 11:19:20AM +0200, Andrea Bolognani wrote:
> > Including minimized JavaScript files in release archives as we're
> > doing right now is also pretty sketchy, since it's basically the same
> > as shipping pre-built binaries instead of the corresponding sources.
> > Debian has a fairly strict policy against it, which is how I came to
> > realized it was an issue in the first place, but I'd be surprised if
> > other distributions were happy with the situation.
>
> I'm fine if we put non-minimized JS in GIT & (optionally) minimize it
> during build.
That would be an improvement on the current situation, but it would
also mean hooking up a JavaScript minifier to our build system. I'm
not quite sure how those things work, but I think the ones that are
widely used depend on node.js and who knows how many nano-libraries
pulled from NPM to do their thing?
Fedora has uglify-js RPM present in its repos which is trivial
to install & use
$ uglify-js foo.js > foo.min.js
If a distro lacks this package, simply don't minimize it.
Counter-proposal: can we just get rid of the RSS widget from the
homepage? That's literally the only reason we included all this
JavaScript in the first place. It's cute, but possibly not worth
the effort if you take into account having to spend time keeping up
with updates to jQuery and friends, which if history is any
indication we'd do a pretty awful job at anyway.
As a data point, the QEMU website provides a link to Planet Virt
Tools in its footer. We could do the same: we even already have a
bunch of links there.
Hiding a link in the footer is really poor in comparison. The point
of having the feed content on the website is that it gives direct
visibility to visitors of the site. Far fewer will notice & follow
a link in the footer. We need to be improving visibility of relevant
content, not making it worse.
Updating jQuery is not a burden / timesink. It is something we
haven't considered a priority to bother with as it has just worked
fine. So there's no compelling reason to remove it when it is
serving an important use case.
> > We're only using JavaScript for the fancy blog roll on
the homepage
> > and global search drop-down menu anyway, both of which are only
> > relevant to
libvirt.org and should be scrapped when installing
> > documentation on the end user's machine. I'm working on a follow-up
> > series that does just that.
>
> Is there really a benefit to disabling it locally ? IMHO it is fine to
> have it locally, not least as it lets people changing the website see
> it in the same way it will look when published live.
Ideally browsing locally installed documentation would not result
in poking around the Internet. Even when the lack of network
connection is handled gracefully, which is the case for us already,
it can be considered a minor breach of privacy to load online
resources when the user's expectations are to be only accessing
local content.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|