Pure Javascript and HTML application and deployment via CDN ... good idea?

A big and general question, although NOT a discussion

My friend and I are discussing a web application being developed. It currently uses PHP, but PHP does not store anything, and they are all based on OAuth. All this speaks of an independent API. PHP really just mirrors a lot of Javascript logic for browsers without Javascript support.

If you decide to include Javascript as a requirement (don't go into this ... a whole different problem)

Are there any technical, fundamental problems serving the application like HTML + Javascript placed on a CDN? That is 100% static javascript and HTML without server logic. Because Javascript is just as capable of making all API calls as PHP. Are any existing sites being used?

We can't think of any show stoppers, but it seems like a scary idea is to make the "web application" a 100% client side ... so look for more input.

(To clarify, we are talking about deploying using javascript and HTML ONLY and refusing server-side processing outside the JSON API or something else)

Thanks in advance!

+4
source share
2 answers

One problem is with search engines.

Search bots index the source HTML for a web page. If you use JavaScript to load new data and create new content, the crawlers will not enter the game, so your content will not be indexed.

However, Google offers a solution for this - read here: http://code.google.com/web/ajaxcrawling/

Other than that, I cannot think of any other problem ...

+4
source

Amazon has been offering a service on its S3 for a while. http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html Essentially, this allows you to specify the default indexing page and error pages. Otherwise, you just upload your html to S3 and name your www CNAME in your domain in an Amazon S3 bucket or cloud CDN.

The only thing that is impossible in this case is that the user types example.com instead of www.example.com, you must make sure that your DNS correctly redirected them to www. Also, S3 will not be able to process the bare domain (http://example.com/).

As for a good idea, that sounds good to us. And we are currently exploring this option. So far, everything is working fine. We did this to install beta.example.com, to point to the site hosted on CDN (S3), and to test so that it gives us everything we need. Performance is excellent!

+2
source

All Articles