Okay, yes, thank you for clarifying! I think the opening line of
Wikipedia's CORS page [1] is a little misleading.
So I can load the js in my page from a different domain, but I can't use
javascript to grab content / data from another domain -- and that is where
CORS / JSONP would come in.
Thanks for these suggestions! The details of our requirements are still
being determined, but I expect it will involve placing the same js-powered
navbar on multiple sites hosted on different servers with varying degrees
of access, from entirely in-house to entirely hosted with some ability to
You don't need CORS or JSONP for straight javascript (in fact JSONP is
designed to get past SOP by getting the browser to treat a JSON file as
regular javascript). You can load js from anywhere on the web, basically.
Best regards,
*Jason Bengtson, MLIS, MA*
Head of Library Computing and
Do you have access to the server-side? Server side scripting languages (and
the frameworks and CMSes built with them) have provisions for just this
sort of thing. Include statements in PHP and cfinclude tags in coldfusion,
for example. Every Content Management System I've used has had a provision
On Jan 10, 2015, at 8:37 PM, Jason Bengtson wrote:
Do you have access to the server-side? Server side scripting languages (and
the frameworks and CMSes built with them) have provisions for just this
sort of thing. Include statements in PHP and cfinclude tags in coldfusion,
for example. Every
Hi Anna.
I'm not sure about the previous thread, but one solution could be to create
an html page with just the content you wish to be globally available and
then insert that content into multiple pages using an `iframe` element.
For example:
'''
!doctype html
body
header
Hi all,
Some time ago there was a code4lib thread about hosting some content
centrally (like a global navbar) for use on multiple web sites.
I haven't been able to find it again. Can anyone point me to it?
Thanks!
Anna