[whatwg] What will not work when we do not have server ?

Philip Taylor excors+whatwg at gmail.com
Mon Mar 29 08:38:23 PDT 2010


On Mon, Mar 29, 2010 at 4:27 PM, Tab Atkins Jr. <jackalmage at gmail.com> wrote:
> On Mon, Mar 29, 2010 at 7:05 AM, narendra sisodiya
> <narendra.sisodiya at gmail.com> wrote:
>> Dear all,
>>     I am making a (uff from long time) some e-learning modules using HTML5.
>> The idea is just to make a full interactive lectures (audio, video, svg
>> animations , JavaScript, canvas , all sort of new good web technologies etc
>> ),
>> But there is a little problem. Student will be able to download as a zip
>> file. When they want to watch those html5 based interactive tutorials, all
>> they need to click on index.html which will open the tutorial.
>>  I want to ask that what will not work in this mode.
>> for example, I have cheked that some basic jQuery ajax demos are working
>> well in both url
>> http://localhost/narendra/demo.html OR file:///var/www/narenda/demo.html
>>
>> I want to know the list for all the such drafts which will not work without
>> server. So that I will avoid them Or try to get some workaround.
>
> Anything that requires a server-side language (PHP, ASP, Python, Ruby,
> etc.) won't work.  Anything that requires only client-side languages
> (HTML, CSS, Javascript) will.

But you also need to be careful about security rules for file://
differing from http://, e.g. Firefox 3 apparently considers files in
parent directories to be non-same-origin, so you can't use
XMLHttpRequest to get "../foo/bar.txt", and if you have an <img
src="../images/example.png"> and draw it on a <canvas> then you won't
be able to call toDataURL or getImageData, whereas it would be fine if
the files were on an http:// site.

-- 
Philip Taylor
excors at gmail.com



More information about the whatwg mailing list