[CLJS-392] Documentation says CLJS can open connections to the REPL server from a "file://" source, and you can't Created: 09/Oct/12 Updated: 24/Oct/12 Resolved: 24/Oct/12 |
|
| Status: | Resolved |
| Project: | ClojureScript |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Trivial |
| Reporter: | Nahuel Greco | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | bug, docs, documentation | ||
| Environment: |
ClojureScript 0.0-1450 |
||
| Description |
|
At https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments there is the following paragraph: "This is a problem for the browser-connected REPL because FireFox and Chrome both view opening a file from the file system and connecting to localhost:9000 as different domains. From what I tested, you CANT connect to the REPL server at "http://localhost:9000/repl" if you initially loaded the page using the "file://" protocol. But you can if you loaded it from the same hostname on another port using "http://". The documentation is wrong, and also it needs to be clarified on what you really can change from the initial domain, like the port, without broking the REPL connection (or link to a CrossPageChannel documentation page with the details on what same-origin policy checks it can overcome). |
| Comments |
| Comment by David Nolen [ 23/Oct/12 7:00 PM ] |
|
Are you unable to edit the wiki? |
| Comment by Nahuel Greco [ 24/Oct/12 9:27 AM ] |
|
I didn't know the wiki had public write permissions. Also I don't know the exact CrossPageChannel limitations. |
| Comment by David Nolen [ 24/Oct/12 10:37 AM ] |
|
The limitation is that it won't work with file://. We now provide a simple webserver that will serve the files present in the directory where you started browser REPL. If you goto http://localhost:9000/ we will serve index.html if it is present. |
| Comment by Nahuel Greco [ 24/Oct/12 10:47 AM ] |
|
So CrossPageChannel overcomes the "same origin policy" for different ports, but not for different protocols. Thanks for the clarification. |
| Comment by David Nolen [ 24/Oct/12 2:48 PM ] |
|
No problem, closing this one. |