using iipmooviewer without a web server (from local disk)

  • DGSL

    DGSL - 2014-03-30


    I tried to run iipmooviewer zoom into tiles created with Zoomify, for a project which must be running from a CD or a local disk (so running iipserver is not possible in this case; but I want to use iipmooviewer rather than zoomify client).

    My zoomify example page runs without problems. Extract code of the relevant part:

    <TD><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" CODEBASE=",0,40,0" WIDTH="750" HEIGHT="450" ID="theMovie">
    <PARAM NAME="FlashVars" VALUE="zoomifyImagePath=../exampleimage1">
    <PARAM NAME="SRC" VALUE="ZoomifyViewer.swf">
    <EMBED FlashVars="zoomifyImagePath=../exampleimage1" SRC="ZoomifyViewer.swf" MENU="false" PLUGINSPAGE=""  WIDTH="750" HEIGHT="450" NAME="theMovie"></EMBED>

    exampleimage1 is the folder containing the zoomify ImageProperties.xml file, and the folders containing the tiles:


    But I am not being able to configure iipmooviewer to visualize the same image tiles.
    This is what I tried so far (show only the end of my code which I think is the relevant stuff):

    <script src=""></script>
    <script type="text/javascript" src="js/iipmooviewer-2.0-min.js"></script>
    <script type="text/javascript" src="src/protocols/zoomify.js"></script>
    <script type="text/javascript">
     // Create our iipmooviewer object
     new IIPMooViewer( "viewer", {
       server: "../",
       image: "exampleimage1",
       protocol: "zoomify"
        <div id="viewer"></div>

    Doesn't work.
    I just got this Javascript alert:

    Error: no response from server "../"

    And from Chrome Javascript console I got these messages, which I do not understand at all:

    OPTIONS file:///C:/mypath/exampleimage1/ImageProperties.xml No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. mootools-yui-compressed.js:485
    XMLHttpRequest cannot load file:///C:/mypath/exampleimage1/ImageProperties.xml. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. zfiipimage2.html:1
    Uncaught TypeError: Cannot call method 'split' of undefined zoomify.js:22

    How can I solve this?
    Remember I need it to run from a CD or from the hard disk path were my client decides to copy all the files (so I need to use relative paths from the script, since I cannot know in advance the absolute paths).

    Many thanks in advance


  • Ruven

    Ruven - 2014-03-31

    The error is because your browser does not allow Ajax requests to a different domain from the one the page is hosted on. What URL are you using to access your page? Are you using "C:\mypath\iipmooviewer-master\zoomifyiipimagetest.html" directly?

    • DGSL

      DGSL - 2014-03-31
      Last edit: DGSL 2014-03-31
  • DGSL

    DGSL - 2014-03-31

    Yes. I do the same for zoomify client test page and it works. These are the urls copied-pasted from Chrome address bar:

    (it works)

    (doesn't work)

    What urls should I use to make it work?
    (actually, everything is within C:/mypath, so there is not a different domain ... well, there is no domain, I think)

    Last edit: DGSL 2014-03-31
  • Ruven

    Ruven - 2014-04-01

    I presume you're using the zoomify flash client? If so, then it works because flash does not have the same same origin security as javascript.

    Try first setting the server parameter in your html to something like file:\\ plus the full path. Get that working first, then start trying with relative paths.

  • DGSL

    DGSL - 2014-04-01

    Thanks Ruven. I tried that but couldn't get it working.

    I used forward slashes (like the url from the address bar) ... not sure if that is the correct way, but now I tried backslashes and the problem persists.
    Have you tried that before and worked?? Please share your example

    Maybe I misunderstood the scenario you refer to in this sentence:
    "IIPMooViewer, however, also supports the Zoomify and Deepzoom protocols if you are unable to install the server or are working in a legacy environment."

    Which kind of environment would that be? Did you not mean something like what I am trying?


    BTW - Yes, zoomify flash client in the other working scenario

    Last edit: DGSL 2014-04-01
  • Ruven

    Ruven - 2014-04-01

    No, I've never tried to load local files. IIPMooViewer supports zoomify and deepzoom tiles when hosted through a web server.

    So, I've done some investigating and it looks like you cannot run AJAX requests at all on a local file. So, you can either

    1) Setup a simple web server on your local machine and run everything through that.
    2) Or you can try modifying your browser as described here:
    3) Or use flash and IIPZoom instead of IIPMooViewer

  • DGSL

    DGSL - 2014-04-03

    OK thanks a lot for the advices!

  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2015-09-08

    Hello, banging my head against the wall with the same issue. I can see that deepzoom.js can access the file but it gives error that no responce from server (which was defined as file:///Users/Sites/demo/) and console tells that Uncaught TypeError: Cannot read property '1' of null (deepzoom.js)

    Many thanks in advance



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks