Introducing W3C's JavaScript repository

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Introducing W3C's JavaScript repository

Antonio Olmo Titos

Hello

Too often, we upload to w3.org new copies of JS resources that are
publicly available on the site already. Examples of those JS libraries
or files are: jQuery, Slidy, swfobject.js, MathJax, impress.js, Prism...
We commit those files, often in the exact same versions, when we create
specs, pages about events, group pages, staff-only pages, personal
pages, etc.

There are good reasons to try to avoid this redundancy ¹.

 From now on, please check if the JS module you need is here, before
uploading a new copy:

     https://www.w3.org/scripts/

If it is not, but still it is a fairly popular module that others might
need too, please write [hidden email] or [hidden email] to get it added
to the repository.

We realise the current list is limited -- we included a few of the most
common libraries, but will add more in the future.

You are encouraged to link to any JS files there from any page *within
W3C space*. The JS files themselves are world-readable, so any visitor
of your pages will be able to retrieve them.

This index page, on the other hand, we decided to keep staff-only for
now: there is some concern that if it were public, this repo would be
(mis)treated by some from non-W3C sites as a free CDN (which it is not).

For more information, questions or suggestions, please read/contribute
on the wiki: https://www.w3.org/Team/wiki/JS , or drop us a line!

····
¹ https://www.w3.org/Team/wiki/JS#Purpose

--
Antonio Olmo Titos
   web developer, W3C
   [hidden email]
   http://w3.org/People/Antonio
   +81 335162504



Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Tobie Langel-4
On Tue, Jul 28, 2015, at 11:22, Antonio Olmo Titos wrote:
> Too often, we upload to w3.org new copies of JS resources that are
> publicly available on the site already. Examples of those JS libraries
> or files are: jQuery, Slidy, swfobject.js, MathJax, impress.js, Prism...
> We commit those files, often in the exact same versions, when we create
> specs, pages about events, group pages, staff-only pages, personal
> pages, etc.

Good idea.
 
> We realise the current list is limited -- we included a few of the most
> common libraries, but will add more in the future.

What's your plan for versioning if any?

> You are encouraged to link to any JS files there from any page *within
> W3C space*. The JS files themselves are world-readable, so any visitor
> of your pages will be able to retrieve them.
>
> This index page, on the other hand, we decided to keep staff-only for
> now: there is some concern that if it were public, this repo would be
> (mis)treated by some from non-W3C sites as a free CDN (which it is not).

That seems like an excessive upfront concern that won't actually solve
the problem (if there is one). What's to stop me from curling for lib
names until I hit a 200 OK?

You could also filter out requests using the HTTP_REFERER header if
hot-linking really becomes a problem.

> For more information, questions or suggestions, please read/contribute
> on the wiki: https://www.w3.org/Team/wiki/JS , or drop us a line!

This seems to be staff only. Suggest either opening it up or avoiding to
mail public mailings lists about this.

Best,

--tobie

Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Antonio Olmo Titos

On 28/07/15 Tobie wrote:
> What's your plan for versioning if any?

We encourage people to link to the "latest patch" shortcuts, eg
     //www.w3.org/scripts/angularjs/1.3/*
instead of
     //www.w3.org/scripts/angularjs/1.3.16/*

We will upload security patches, and update "latest patch" symlinks to
point to those.

About different "major" and "minor" numbers, we'll try to stay
reasonably up to date. But we don't intend to follow development of all
these projects very closely, except when they bring significant
improvements, or if there are requests from users. Worst case scenario:
one really needs version X of Y, but the team doesn't consider it useful
or popular enough → he/she can upload their own files, as we used to do
until today. We are not saying this will evolve into a strong constraint
in the long term, ie banning all custom JS from the site. We are not
saying it won't, either :)

> That seems like an excessive upfront concern that won't actually solve
> the problem (if there is one). What's to stop me from curling for lib
> names until I hit a 200 OK?
> You could also filter out requests using the HTTP_REFERER header if
> hot-linking really becomes a problem.

We realise that "hiding" the index does not solve the hypothetical
problem of too many people linking to those files. We discussed several
options, ranging from paranoid to naïve. This was a simple compromise to
get started. Filtering headers was considered too, and we may still do
that. Thanks for the reminder!

Anyway, let me correct myself: it isn't as restrictive as I said before:

On 28/07/15 Antonio wrote:
> This index page, on the other hand, we decided to keep staff-only for now

It's visible also to anyone with a W3C account (not only staff).

On 28/07/15 Tobie wrote:
> This seems to be staff only. Suggest either opening it up or avoiding to
> mail public mailings lists about this.

I'm sorry about that. I sent this to several lists, and didn't realise
part of this wouldn't be publicly readable...

--
Antonio Olmo Titos
   web developer, W3C
   [hidden email]
   http://w3.org/People/Antonio
   +81 335162504



Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Tobie Langel-4
On Tue, Jul 28, 2015, at 12:46, Antonio Olmo Titos wrote:
> On 28/07/15 Tobie wrote:
> > This seems to be staff only. Suggest either opening it up or avoiding to
> > mail public mailings lists about this.
>
> I'm sorry about that. I sent this to several lists, and didn't realise
> part of this wouldn't be publicly readable...

Would be good to at least have wiki/index page consistency (i.e. make
them both member-only, or better:  both public).

--tobie

Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Antonio Olmo Titos

On 28/07/15 Tobie wrote:
> Would be good to at least have wiki/index page consistency (i.e. make
> them both member-only, or better:  both public).

I don't think that is useful or even advisable, Tobie.
These wiki pages we use to discuss low-level technical details; they may
contain info about our implementation, systems, etc.

I just changed copy and style to make it more clear that's a secondary
resource, available only to the team.

--
Antonio Olmo Titos
   web developer, W3C
   [hidden email]
   http://w3.org/People/Antonio
   +81 335162504



Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Tobie Langel-4
On Wed, Jul 29, 2015, at 05:00, Antonio Olmo Titos wrote:
> On 28/07/15 Tobie wrote:
> > Would be good to at least have wiki/index page consistency (i.e. make
> > them both member-only, or better:  both public).
>
> I don't think that is useful or even advisable, Tobie.
> These wiki pages we use to discuss low-level technical details; they may
> contain info about our implementation, systems, etc.

I wouldn't know since I don't have access to them.

> I just changed copy and style to make it more clear that's a secondary
> resource, available only to the team.

My point still holds, though. Either the info is useful and it should be
open or it's not and it shouldn't be mentioned.

Currently it just feels like there are completely artificial
confidentiality rings for no (good) reason whatsoever.

Just my CHF 0.02. :)

--tobie

Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Antonio Olmo Titos
In reply to this post by Antonio Olmo Titos
On 28/07/15 Antonio wrote:

> Hello
> Too often, we upload to w3.org new copies of JS resources that are
> publicly available on the site already. Examples of those JS libraries
> or files are: jQuery, Slidy, swfobject.js, MathJax, impress.js,
> Prism... We commit those files, often in the exact same versions, when
> we create specs, pages about events, group pages, staff-only pages,
> personal pages, etc.
> There are good reasons to try to avoid this redundancy ¹.
> From now on, please check if the JS module you need is here, before
> uploading a new copy:
> https://www.w3.org/scripts/
> If it is not, but still it is a fairly popular module that others
> might need too, please write [hidden email] or [hidden email] to get it
> added to the repository.
> We realise the current list is limited -- we included a few of the
> most common libraries, but will add more in the future.
> You are encouraged to link to any JS files there from any page *within
> W3C space*. The JS files themselves are world-readable, so any visitor
> of your pages will be able to retrieve them.
> This index page, on the other hand, we decided to keep staff-only for
> now: there is some concern that if it were public, this repo would be
> (mis)treated by some from non-W3C sites as a free CDN (which it is not).
> For more information, questions or suggestions, please read/contribute
> on the wiki: https://www.w3.org/Team/wiki/JS , or drop us a line!
> ····
> ¹ https://www.w3.org/Team/wiki/JS#Purpose

Hello

By popular demand, our little JS repository has seen some additions
since we announced it:

    • jQuery UI 1.11.4
    • Shower 1.0.7
    • MathJax 2.5.3 (new version)

Kindly remember to check here first before you upload yet another copy
of jQuery to the site.

If the framework/library you want is not listed there && it is not too
obscure {
    feel free to write [hidden email] to add it to
https://www.w3.org/scripts/
}

--
Antonio Olmo Titos
  web developer, W3C
  [hidden email]
  http://w3.org/People/Antonio
  +81 335162504


Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Doug Schepers-3
In reply to this post by Tobie Langel-4
+1 to all of Tobi's suggestion on this thread.

In particular, I read the Team-only wiki page, and there's nothing there
that couldn't be public. Public resources are more likely to be
maintained, and more likely to help others understand our publication
processes.

Regards–
–Doug

On 7/29/15 3:18 AM, Tobie Langel wrote:

> On Wed, Jul 29, 2015, at 05:00, Antonio Olmo Titos wrote:
>> On 28/07/15 Tobie wrote:
>>> Would be good to at least have wiki/index page consistency (i.e. make
>>> them both member-only, or better:  both public).
>>
>> I don't think that is useful or even advisable, Tobie.
>> These wiki pages we use to discuss low-level technical details; they may
>> contain info about our implementation, systems, etc.
>
> I wouldn't know since I don't have access to them.
>
>> I just changed copy and style to make it more clear that's a secondary
>> resource, available only to the team.
>
> My point still holds, though. Either the info is useful and it should be
> open or it's not and it shouldn't be mentioned.
>
> Currently it just feels like there are completely artificial
> confidentiality rings for no (good) reason whatsoever.
>
> Just my CHF 0.02. :)
>
> --tobie
>

Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

Sangwhan Moon
Going back to the original problem at hand, wouldn't this service not be needed if the underlying filesystem was moved to a filesystem with support for deduplication? (You'll still have multiple versions of jQuery, but at least you'll only internally have one copy of each version unless it was locally modified by someone.)

Just a thought.

Sangwhan

On Fri, Oct 2, 2015 at 1:07 PM, Doug Schepers <[hidden email]> wrote:
+1 to all of Tobi's suggestion on this thread.

In particular, I read the Team-only wiki page, and there's nothing there that couldn't be public. Public resources are more likely to be maintained, and more likely to help others understand our publication processes.

Regards–
–Doug


On 7/29/15 3:18 AM, Tobie Langel wrote:
On Wed, Jul 29, 2015, at 05:00, Antonio Olmo Titos wrote:
On 28/07/15 Tobie wrote:
Would be good to at least have wiki/index page consistency (i.e. make
them both member-only, or better:  both public).

I don't think that is useful or even advisable, Tobie.
These wiki pages we use to discuss low-level technical details; they may
contain info about our implementation, systems, etc.

I wouldn't know since I don't have access to them.

I just changed copy and style to make it more clear that's a secondary
resource, available only to the team.

My point still holds, though. Either the info is useful and it should be
open or it's not and it shouldn't be mentioned.

Currently it just feels like there are completely artificial
confidentiality rings for no (good) reason whatsoever.

Just my CHF 0.02. :)

--tobie





--
Sangwhan Moon [Opera Software ASA]
Software Engineer | Tokyo, Japan
Reply | Threaded
Open this post in threaded view
|

Re: Introducing W3C's JavaScript repository

timeless-3

Sangwhan Moon wrote:
> Going back to the original problem at hand, wouldn't this service not be needed if the underlying filesystem was moved to a filesystem with support for deduplication?

There may be a theoretical space benefit to the Host server, but the main benefit is to people reading specs, as their web browsers are likely to have a cached version of the file, and thus fewer hits to the webserver.