[xwiki-users] Including local (file://) webpage
Hello, I'm pretty sure this can't be done currently, but I still wanted to double check. It seems that Chrome and Firefox prevent linking to local files - so the IFrame macro, when pointing to file://someserver/somefile.html, doesn't display anything. For some reason IE allows it, so I do see the content of my frame when displaying the page with IE. I was thinking maybe the xwiki.getURLContent would fetch the content of my local html file and generate the content server side so that my web browser wouldn't know the difference, but it doesn't seem to work with my file:// link. Does somebody have an idea of how I could go about including a local html file in xwiki pages? Thanks, Phil -- View this message in context: http://xwiki.475771.n2.nabble.com/Including-local-file-webpage-tp7598333.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, On 4 Mar 2016 at 21:55:55, pgregoire ([email protected](mailto:[email protected])) wrote:
Hello, I'm pretty sure this can't be done currently, but I still wanted to double check. It seems that Chrome and Firefox prevent linking to local files - so the IFrame macro, when pointing to file://someserver/somefile.html, doesn't display anything. For some reason IE allows it, so I do see the content of my frame when displaying the page with IE.
I was thinking maybe the xwiki.getURLContent would fetch the content of my local html file and generate the content server side so that my web browser wouldn't know the difference, but it doesn't seem to work with my file:// link.
Does somebody have an idea of how I could go about including a local html file in xwiki pages?
You need to configure your browser to remove the security feature of not opening local file:// links. Whether the link is opened in a wiki link or in an HTML IFRAME SRC attribute, it’s the same issue. There are plenty of resource on google to do this. Here’s just one for Chrome: http://voxelent.com/local-chrome/ Thanks -Vincent
Thanks, Phil
Yes, I understand it can be handled on the client web-browser side, I was wondering if there was some way that on the server side, the wiki server could parse the webpage and include the *resulting page* in another web page (as opposed to a link to the page), so that to the client, it would look like one single webpage, and not one webpage that links another. I'm guessing not, it is a pretty specific requirement - on our implementation it would just have been a "nice to have" so we can live without it. Thank you, Phil -- View this message in context: http://xwiki.475771.n2.nabble.com/Including-local-file-webpage-tp7598333p759... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 7 Mar 2016 at 13:55:40, pgregoire ([email protected](mailto:[email protected])) wrote:
Yes, I understand it can be handled on the client web-browser side, I was wondering if there was some way that on the server side, the wiki server could parse the webpage and include the *resulting page* in another web page (as opposed to a link to the page), so that to the client, it would look like one single webpage, and not one webpage that links another.
I'm guessing not, it is a pretty specific requirement - on our implementation it would just have been a "nice to have" so we can live without it.
So you’re asking if an XWiki server (thus located on a server machine) could access a file located only locally on another machine? :) The answer is no and this is not related to XWiki, you just can’t access a file from another machine if there’s no remote protocol to access it obviously. Or maybe I misunderstood something. Thanks -Vincent
Thank you, Phil
Well, file:// aside, I'm wondering whether there is an xwiki macro that will actually get the URL content of a certain URL, and render it within a page. I thought that this was what getURLContent did, but if such is the case, then it's my understanding that the macro runs on the server to render a page which it makes available to the client side. Then, it is the server that accesses the said URL content, hence the browser security settings would be irrelevant since the client browser is reading a wiki page like any other, no matter where the URL content originated from. -- View this message in context: http://xwiki.475771.n2.nabble.com/Including-local-file-webpage-tp7598333p759... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 7 Mar 2016 at 16:24:11, pgregoire ([email protected]) wrote: Well, file:// aside, I'm wondering whether there is an xwiki macro that will actually get the URL content of a certain URL, and render it within a page. Yes that works fine. I thought that this was what getURLContent did, but if such is the case, then it's my understanding that the macro runs on the server to render a page which it makes available to the client side. Correct. Then, it is the server that accesses the said URL content, hence the browser security settings would be irrelevant since the client browser is reading a wiki page like any other, no matter where the URL content originated from. Sure. But if the server can access a remote page then so can your local browser ;) (unless you have proxy security settings that prevent you from doing so). Thanks -Vincent
Ok then, thanks for the answers - I'll look into using the getURLContent function then. vmassol wrote
On 7 Mar 2016 at 16:24:11, pgregoire (
pgregoire@
) wrote:
Well, file:// aside, I'm wondering whether there is an xwiki macro that will actually get the URL content of a certain URL, and render it within a page. ==Yes that works fine.==
I thought that this was what getURLContent did, but if such is the case, then it's my understanding that the macro runs on the server to render a page which it makes available to the client side. ==Correct.==
Then, it is the server that accesses the said URL content, hence the browser security settings would be irrelevant since the client browser is reading a wiki page like any other, no matter where the URL content originated from. ==Sure. But if the server can access a remote page then so can your local browser ;) (unless you have proxy security settings that prevent you from doing so).== Indeed, it is security settings preventing me - IE's default settings let it through and I do see the webpage. However I don't want to have to change those settings enterprise-wide, which is why I'm looking into an alternate solution.
Thanks
-Vincent _______________________________________________ users mailing list
users@
-- View this message in context: http://xwiki.475771.n2.nabble.com/Including-local-file-webpage-tp7598333p759... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (2)
-
pgregoire -
vincent@massol.net