title: How to save login credentials using Javascript?
body: <p>I want to add integration with a third-party service to a web application (developed in HTML and Javascript) which targets Android / iOS (and later Windows Phone). Thus I have access to all "modern" features. This third-party service needs credentials and is controlled via GET-Parameters.<br>
  For example, a request url could look like "http://www.example.org/foo?username=user&amp;password=1234".</p>
  
  <p>Changing the third-party service to accept hashed passwords is no option as I have no access to it.</p>
  
  <p>As the user does not want to type in his username and password every time he uses the service or starts the application, I want to save his credentials somehow.</p>
  
  <p>Now I wonder, what's the best way to do so.<br>
  I know that real "security" is an illusion here but I do not want to expose the credentials to unnecessary risks by saving them the wrong way.</p>
  
  <p>I already thought about several possible ways</p>
  
  <ul>
  <li>Plain Cookies: The most
  straightforward way - is it "secure"
  enough in this scenario? </li>
  <li>DOM-Storage:
  Any differences to cookies in this
  relationship? </li>
  <li>Encrypted Cookies: The
  credentials would be encrypted, but
  you could easily find out the key
  when looking at the source code of
  the page or debugging it.</li>
  </ul>
  
  <p>Which one should I choose? Are there any better ways?<br>
  Is bothering with encrpytion actually worth it when it can be cracked that easily?</p>