[X3D-Public] Is there a 'base url' for VRML/X3D browsers?
michalis.kambi at gmail.com
Tue Aug 2 00:34:37 PDT 2011
2011/8/1 Dave A <dave at realmofconcepts.com>:
> Hello again,
> I'm using Contact, I'm not seeing this, at least as anything standard, am I
> missing it?
> What I need to know is the 'base url', that is, the domain and path, that my
> content is served from. Or more precisely, I DON'T want to know it, I'd like
> to be able to use relative paths, specifically for using createX3DFromURL
> and such.
> Say I have a script that calls thus:
> Browser.createX3DFromURL ('generate.php', this, 'loaded');
> Where does the 'generate.php' file need to be?
X3D spec says explicitly "The URL may be a relative URL which is
considered to be using the browser location as the base document."
So relative paths should definitely work. If the URL is a simple
"generate.php" , it should just be in the same directory as world,
like Lauren says.
Maybe somehow the plugin has the wrong idea of what the "current URL"
is? Maybe you have a page on a server, that accidentaly refers to
localhost for model location? There must be some accidental use of
"localhost" somewhere, if your browser goes from mydomain.com to get
resources from localhost.
More information about the X3D-Public