Re: Reference to RDFJS libraries

Storing locally or remotely mostly depends on the application. In my JS
libraries, I bundle the depencies if there is a chance of my library being
used offline.

About hosting the files: I wouldnt use GitHub. It is slower than other
CDNs, and does not send the correct headers: the expire date is not set to
the far future, which is the most important reason for a CDN. But also the
mime type is incorrect, which might cause issues in IE (see
http://stackoverflow.com/questions/5502540/should-github-be-used-as-a-cdn-for-javascript-libraries
)

Since a week I use cdnjs <https://cdnjs.com/> for hosting my libraries
online (see e.g. YASQE <https://cdnjs.com/libraries/yasqe>). It should be
faster
<http://www.baldnerd.com/make-your-site-faster-cloudflares-cdnjs-vs-google-hosted-libraries-shocking-results/>
than
even the google CDN, and you are able to add your own library.

gr Laurens

ps. About cdnjs: they are now in a transition period where you are not able
to add your own js files manually. Instead, you should make use of their
auto-update system, which polls NPM every 15 minutes for new versions of
the library.

On Wed, Oct 29, 2014 at 12:31 PM, Thomas Hoppe <thomas.hoppe@n-fuse.de>
wrote:

>  Hi,
>
> Github won't work at all as they do not deliver content which allows CORS (
> http://en.wikipedia.org/wiki/Cross-origin_resource_sharing).
> Even if they would, I do not consider it good practice as it is not a CDN.
> You have therefore two options left:
> 1.) You include it in your app during build time (see tools like Grunt how
> to generate a build of JS based apps).
> 2.1) You put it next to your HTML on your server and include it in the
> HTML file.
> 2.2) You include it from a CDN location like cloudflare but of course you
> need to check whether the lib is available
> which is not the case for most RDF related stuff.
>
> Greets, Thomas
>
>
>  On 10/29/2014 12:21 PM, Sarven Capadisli wrote:
>
> Dear Lazy RDFJSWeb,
>
> If you use one of the rdfjs libraries in your front-end (browser)
> application, do you refer to the source or have a local copy?
>
> I'm inclined to point to a GitHub resource for example, if others wouldn't
> mind relying on that in their applications as well i.e., to collectively
> take advantage of user browser caching. Otherwise, it is more of a bother,
> and a local copy instead is as reliable as it gets.
>
> Is there a consensus? Got thoughts?
>
> -Sarven
> http://csarven.ca/#i
>
>
>


-- 

VU University Amsterdam

Faculty of Exact Sciences

Department of Computer Science

De Boelelaan 1081 A

1081 HV Amsterdam

The Netherlands

www.laurensrietveld.nl
laurens.rietveld@vu.nl

Visiting address:

De Boelelaan 1081

Science Building Room T312

Received on Wednesday, 29 October 2014 11:40:04 UTC