On Tue, Jul 15, 2014 at 4:30 AM, <chris.w...@stfc.ac.uk> wrote:
> As a follow up to the recent discussion about Firefox 30, and the use of
> the PHP file, there are a few issues I’d like to get sorted in my head; my
> current understanding / questions:
>
>
>
> - If JSmol is being hosted on a remote server (i.e. a website),
> and the developer has an option to allow end users (viewers of the website)
> to upload a binary file, the PHP handles the file upload (this is no
> different to any kind of file upload that any developer has done since the
> earliest days of web development).
>
In the case of a browser that cannot do AJAX binary (MSIE), right.
Otherwise, provided the files are on the hosted server or are from a
recognized direct-AJAX database such as PDB or PubChem, jsmol.php will not
be invoked.
- If JSmol is hosted on a website, and has a hardcoded path to a
> binary file on the same file system, when does the PHP file get invoked (I
> note that the PHP file has some code to convert binary to base64), or can
> jQuery / JSmol read the file directly in some instances? Or is this browser
> dependent? If it is browser dependent, I assume it’s being called in
> jQuery’s .get() function, so is only invoked if necessary?
>
All browsers have limitations for reading local files in a local
installation. Some browsers (MSIE, Chrome, maybe Safari?) simply cannot
read binary files directly from a hard disk into JSmol/HTML5. Firefox and
Chrome will only read local files of any kind with special settings. See
http://wiki.jmol.org/index.php/Jmol_JavaScript_Object#Current_limitations_of_JSmol
> - If I create a local HTML file with a JSmol applet to view
> binary files in it, and view it in a browser as C:/path/to/file/jsmol.html,
> it’s browser dependent as to whether I can view the binary file (Firefox
> can, chrome can’t)?
>
right.
> As I’m not serving the file via apache, the PHP file certainly isn’t being
> invoked, so the browser / jQuery **can** read the binary?
>
In Firefox, yes.
>
>
> Further to this, I’ve discovered that QtWebkit has different behaviour in
> Windows and Unix; it seems that on Windows, a widget with QtWebkit can
> display binary files, but the same code doesn’t display binary files on
> Unix. Can anyone else confirm whether this behaviour is expected?
>
>
>
> Cheers,
>
> Chris
>
>
>
> -------------------
>
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users