We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, Im rather confused. On the processing.js reference for loadStrings() it states
The filename parameter can also be a URL to a file found online. For security reasons, a Processing sketch found online can only download files from the same server from which it came. Getting around this restriction requires a signed applet.
I know loadStrings() works fine in normal processing and I can grab from the URL http://api.thingspeak.com/update?etc etc
However, I was extremely surprised to find when I ported my code to the JavaScript version and ran it in my browser, loadStrings() continued to work and pull data from the thingspeak server, even though the file is being served locally from either 127.0.0.1:5000 or file:///
Can anyone shed any light on this behaviour please
Answers
Seems like when the server is local, those restrictions don't apply, do they? ;;)
I assumed by the wording of the text i.e "Processing sketch found online can only download files from the same server from which it came" it meant that if the processing sketch was hosted on the same api.thingspeak.com server then it would work fine but as the processing sketch is held on 127.0.0.1:5000 then the thingspeak.com server is remote and it shouldnt work?
Well, why don't you test that for yourself? Host your program on:
http://www.openprocessing.org/sketch/create
http://studio.sketchpad.cc/sp/pad/newsketch
And check if it's still possible to load resources from another host! :-@