Hosting A Website On Webserver Vs Hosting on CDN? - web

I found out recently that it's possible to host a website completely on a CDN and I was wondering what are some pros/cons to hosting on Rackspace CDN instead of a Website?
My website is static so I don't see why it couldn't be done.. the only thing that I'm not sure about is if I could still use an .htaccess file.
If my website is static could all I need be done on a CDN? Is there a way to use the .htaccess file still?

If your web site is completely static files, you could certainly use a CDN to host it.
Pros:
Relatively easy to setup; usually being able to publish files using something like a FTP client.
Scalable with low latency for end-users. CDNs deploy the files to their edge nodes around the globe. This means your web site files will be closer (in terms of network latencies) to your end-users. This results in faster downloading of these files (i.e. your web site) for the end-users.
Cons:
Making your web site dynamic later might require some amount of work - separating static files from dynamic files, publishing static files to CDN and dynamic files to web server, ensuring that static files are published on CDN before they are referenced from other parts of your web site, etc.
See http://www.rackspace.com/blog/point-and-click-your-way-to-a-cloud-files-static-website-with-the-control-panel/ for a detailed walk through on how to setup a static web site using Rackspace Cloud Files CDN.

Related

Live Server for Static Markdown Websites

I am currently looking into static site generators.
I build a testing documentation site with Vuepress and am now fiddling with going into the live operation.
i don't want to publish my files to services (GitHub Pages, Netlify etc.) but I want to host it on my own server.
Generating static html sites everytime I add markdown pages or change the content is not an option.
Is there a way to host Vuepress (or maybe similar markdown generators) where I just need to upload the .md files and everything goes automatically?
There are two basic ways to use markdown as your website...
use a live server:
In this scenario, each request is processed by a program which retrieves the markdown text and does some pre or post processing (templateengine, formatting etc).
This could be a simple CGI script, a web framework or a custom server.
use a static site generator:
You process the markdown on your lokal machine and generate static html files, which are uploaded and served by a web server.
To answer your question whether or how you can use vuepress:
There are multiple possible ways, depending on your current setup.
If you only have some webspace, than you have to upload prerendered html files (or using another framework).
If you have a virtual server, than you can automate the build/rending process by using scripts, e. g. with file watchers.
Note to GitHub:
Even if you said, that you don't want to use GH... If you only want to hide the markdown files, you can create a private repository and use GH Actions as CI/CD pipeline.
Unfortunately Stackoverflow is not for software recommendation, so for alternatives to vuepress have a lookt at Software Recommendations.

Difference between client-server web apps and websites

I am wondering: why we use to split a web app into a client (JavaScript, CSS or even a framework like React or angular) and a server (PHP)?
Why it is preferable to do so instead of simply going on a website that includes PHP and HTML all together?
scalability and private storage. Hosting your own server side framework allows for huge application and privacy. The storage of html is minimal at best so it is much safer to have your own backend stuff. especially for enterprise software.

free cdn for custom javascript and css files

I am looking for a no nonsense free cdn solution for my iis/.net website where i could store all my custom javascript , css and fonts etc to increase my site performance.
Is there any good free cdn available for such purpose?
Go for CloudFlare (https://www.cloudflare.com), its free and very easy to setup (only takes few minutes to setup). Its works on DNS, so you don't have to do any code change as well.
thanks

Angular SEO for a directory multi-language app

I am doing an angularjs app with a nodejs-expressjs server.
I want to do an app that it's similar to a business directory.
I have doubts about if it's possible doing it SEO friendly to the all items at the directory, either by his name or his features (tags). Always having in mind that all pages are created with AngularJS.
If it is possible, how to do that dinamically.
I implemented an example that uses prerender server (this https://github.com/prerender/prerender) and the prerender-node library at the app server.
My example's pages, created by angularjs, does work (are SEO friendly, it appears at google's search)..but the pages are "static", and the directory it's going to add always new bussines to the directory that I want to appear in googles searching.
Besize, I want my app to be multi-language, and also have doubts about how to do all of that be multi-language, and if it is possible.
I hope you can help me.
If you're hosting your own Prerender server, it will serve the page "on the fly" every time Google accesses it, so it will always have the latest, dynamic content from your pages. If you're using a Prerender plugin to cache your pages, you'll need to make sure you recache them... or use our Prerender.io SaaS and we'll take care of all of the recaching for you.
It sounds like you just want Google to crawl your pages more often because of how dynamic your content might be. In order to have Google crawl your pages more often, make sure to quality inbound links from other sites to increase your PageRank.
Here is lots of advice from Google about multi language sites: https://support.google.com/webmasters/answer/182192?hl=en

Is it possible to make a local Chrome web app with offline sensible-data storage?

I would like to create a 100% offline web app in Chrome that stores sensible data. Are there any security issues and if yes, which ones?
Thank you
You can't easily make offline apps that are based on file:// urls, you can however create apps that are hosted on a server that are made to work entirely offline.
Read about AppCache, LocalStorage, WebSQL, IndexedDB and FileSystem API's
If you really really don't want to host it, package your code up as a Packaged App

Resources