Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This may not be an answer to your problems. But your question has gone 6 hours without an answer, so I thought I'd pitch in with a couple of alternative ideas. Perhaps it will spur some creativity in other readers' minds. :)</p> <p>These are sorted in the order of how neat a solution I personally think they are.</p> <h3>Always have a subdomain, even if the user has his/her own</h3> <p>Following your example, you could serve exclusively static pages on <code>www.joebloggs.com</code>, with login links that link to <code>joebloggs.myapp.com</code>. If a user is already logged in, the actual login step can be skipped because cookies are then available.</p> <p>This would require all users to have a subdomain, even if they specify their own domain.</p> <h3>Serve static pages, and use cross-site AJAX</h3> <p>There's a relatively new <strong>draft</strong> standard called <a href="http://www.w3.org/TR/cors/" rel="nofollow noreferrer">Cross-Origin Resource Sharing</a>, which allows AJAX requests across domains. Firefox supports it as of version 3.5, and there are some more readable (than a W3 spec) examples of how this works in practice over at the <a href="https://developer.mozilla.org/En/HTTP_access_control" rel="nofollow noreferrer">Mozilla Developer Center</a>.</p> <p>Besides Firefox 3.5, this appears supported in IE 8. It's in newer versions of Chrome and Safari, but I can't pinpoint since which version. (Webkit changeset #41046.) I can't find anything definitive about Opera.</p> <p>Also note that non-GET requests have the extra overhead of a 'pre-flight' request.</p> <h3>Serve dynamic parts with an iframe</h3> <p>Iframes can be well hidden with some CSS, and made to appear seamlessly on the page. You could serve up the dynamic parts of your page using iframes that point to <code>myapp.com</code>. This would work reasonably well if the dynamic part is just a slice of the page header with some account info and links, for example.</p> <p>If you plan on hiding content based on the user's privileges, you could take this as far as serving the entire content area of the page as an iframe.</p> <p>Downside is that some browsers might complain about mixed plain and secured content.</p> <h3>The classic hide-behind-an-invisible-frame trick</h3> <p>Lots of sites that used to be hosted on platforms such as Geocities used to have those free <code>.tk</code> domains that 'hide' the site behind the pretty URL in the address bar. The trick was that the <code>.tk</code> domain served a frame-set with an invisible frame, and another frame covering all of the window, which would serve the Geocities site.</p> <p>This is <strong>ugly</strong>, of course, but I had to mention it. It means that the address bar will not update with link navigation on your site, and will always show the root URL. It also neglects a lot of possible advantages for having a separate domain. And it may even have the same downside as the previous trick with iframes.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload