stevegw (39) [Avatar] Offline
#1
So far have enjoyed reading both the intro and the initial chapters

Question: I'm not sure of the expectations of the reader audience, but when I try to run ex-2.1-polling-temp.html from the local file system the actual temperature is not visible and it does not update.
If I run a web server from that location and then run for example

http://localhost:8080/chapter2-hello-wot/client/ex-2.1-polling-temp.html

It works

I am running ie64 and chrome 64
I have in the past seen local file execution not work that well

Steve

domguinard (69) [Avatar] Offline
#2
Hi Steve,

Good catch. Actually these examples use CORS to circumvent the http://en.wikipedia.org/wiki/Same_origin_policy Same Origin Policy limitation in the case of IE this seems to be a few issues with CORS and jQuery (http://stackoverflow.com/questions/6318996/jquery-getjson-not-working-properly-in-ie8-with-gdata-json-c-why).

A fallback could be to use jsonP, which is supposed to work better with IE, but the current server on the Pi does not implement jsonP. We'll look into that and explain these tweaks in Chapters 6 and 7.

What I don't really get is why you experience this problem in Chrome. We could not reproduce that. Which version (build) of Chrome do you use?

Thanks for your feedback!
Anonymous (122) [Avatar]
#3
The book is awesome but according to page 31 readers can find the server part of the exercises on a github repository but there seems to be none.

Thanks
Aniebiet

stevegw wrote:So far have enjoyed reading both the intro and the initial chapters

Question: I'm not sure of the expectations of the reader audience, but when I try to run ex-2.1-polling-temp.html from the local file system the actual temperature is not visible and it does not update.
If I run a web server from that location and then run for example

http://localhost:8080/chapter2-hello-wot/client/ex-2.1-polling-temp.html

It works

I am running ie64 and chrome 64
I have in the past seen local file execution not work that well

Steve

Anonymous (122) [Avatar]
#4
Hi Aniebiet,

Thanks for your message, glad you like the book! The server-side code will indeed be available but it not yet. The server-side is looked at in chapter 7 which we currently are finalizing.

In chapter 7 you will actually learn how to build the server and we will then also make the code available. This is what the link in chapter 2 will point to.

Hope that helps, we'll ping everyone once the code is ready.
domguinard (69) [Avatar] Offline
#5
Hi Aniebiet,

Thanks for your message, glad you like the book! The server-side code will indeed be available but it not yet. The server-side is looked at in chapter 7 which we currently are finalizing.

In chapter 7 you will actually learn how to build the server and we will then also make the code available. This is what the link in chapter 2 will point to.

Hope that helps, we'll ping everyone once the code is ready.