You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/05/28 22:15:35 UTC

cordova-plugins git commit: CB-9092 Update local-webserver plugin docs for fixed port warning (localStorage, IndexedDB persistence)

Repository: cordova-plugins
Updated Branches:
  refs/heads/master bef0942b8 -> d8d3dfbd6


CB-9092 Update local-webserver plugin docs for fixed port warning (localStorage, IndexedDB persistence)


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/d8d3dfbd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/d8d3dfbd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/d8d3dfbd

Branch: refs/heads/master
Commit: d8d3dfbd65ef10f511eae4aa98240eed4cb98212
Parents: bef0942
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu May 28 13:16:52 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu May 28 13:16:52 2015 -0700

----------------------------------------------------------------------
 local-webserver/README.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/d8d3dfbd/local-webserver/README.md
----------------------------------------------------------------------
diff --git a/local-webserver/README.md b/local-webserver/README.md
index ed12bb7..8268285 100644
--- a/local-webserver/README.md
+++ b/local-webserver/README.md
@@ -10,6 +10,18 @@ For the local web server to start, the url **must** be http://localhost, and you
     
 Check your console log for errors in configuration. 
 
+### localStorage, IndexedDB persistence
+
+If you plan on using HTML5 localStorage and/or IndexedDB, you must choose a fixed port in the `content` tag specified above. This is because of the HTML5 Origin policy (scheme, domain and port must be the same).
+
+In the `config.xml` in your project root, change the '0' port to a number between 1 and 49152 (avoiding the ephemeral port range of 49152 to 65535 on iOS). For example:
+    
+        <content src="http://localhost:49000" />
+    
+
+This port number must be consistent across all app launches for saved data to be accessed.
+
+
 ## Security Caveats
 
     In order to limit access to your app, requests are restricted to localhost and are protected with an auth token.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org