Is the OpenLayers Js script available in a CDN somewhere - in a minified version?
I don't want to load it from their website, that would be to slow and not nice.
Is the OpenLayers Js script available in a CDN somewhere - in a minified version?
I don't want to load it from their website, that would be to slow and not nice.
I don't think so. There is no point hosting it on CDN because it's not that widely used library(comparing to jQuery), so chances that it's already cached in users browser when they visit your site are small.
More than that - you should build your own custom version of OpenLayers for production that would only contain features that you need, because whole library itself is huge(~ 1mb). Here's how you do it
This might be better suited as a comment if I had the reputation level to write one, but just wanted to add to @Damirko's answer: there have been some minor OL releases since 2.11, but the parent directory of the most recent stable version is http://cdnjs.com/libraries/openlayers/.
EDITS: 1) At time of writing, have not found a CDN for OpenLayers 3 yet. 2) Per @Kevin's input, the OpenLayers.js file in the CDNJS directory I mentioned is the minified version.
I was looking for a openlayers 3 cdn and found this answer, I found it in the openlayers examples and desiced to put here this answer in case others are looking for openlayers 3.5 cdn which is the new version currently:
js
https://cdnjs.cloudflare.com/ajax/libs/ol3/3.5.0/ol.js
css
https://cdnjs.cloudflare.com/ajax/libs/ol3/3.5.0/ol.css
ol 3.6 is out:
js
https://cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.js
css