简体   繁体   中英

Landing page on web application?

General question about the landing page(static page) for a web-application.

So I'm working on my own web application which I want to create a static landing page which will give general information about the product and perhaps a quick way to let others sign up. Would the best way to go about this be to have separate resources (html/css) folders from the application.

For example (using nginx as my server) www.example.com -> will serve those independent (html/css) files which will reside in a different directory and essentially be composed of pure html.

app.example.com -> using a subdomain will serve the rails application.

I just want to get a better understanding how others go about having independent landing pages for their web applications.

If you want to develop a static web page or landing page these are the things I will consider myself.

Technically:

I will create folder structure as showed below.

-example.html(root level) ---css(inside folder store css files) ---images folder(store all the images) ---modules(store html files inside it) ---scrpits(all java scripts files must be stored here).

As a product developer:

I will make sure I will represent information in the landing page as clear as possible.

Having two different domains complicates issues unnecessarily (unless you have Twitter or Amazon levels of traffic). Rather:

Rails will automatically serve anything in public/ folder as static content; no need to set up a separate nginx conf for that. public/index.html will respond to http://example.com/index.html , and public/css/style.css will be rendered at http://example.com/css/style.css .

Landing page in Rails is the index action; so static page doesn't work as a landing page by default. This question shows an easy way to get around that.

Of course, you could also make an active page as your landing page, and render it from a view as usual.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM