V
V
Viktor Kulyabin2019-02-12 01:11:49
JavaScript
Viktor Kulyabin, 2019-02-12 01:11:49

Is it right to organize frontend delivery in this way?

Compiled a project assembly template - a repository with a detailed description
Brief description
The template allows you to upload only the necessary resources to the pages. This is achieved by dividing the page into blocks (components). Resources are loaded onto the page via an ajax request. The response is cached in localStorage. When downloading, the cache is checked for validity.
I would like to ask the community:

  1. How correct is this approach to resource delivery?
  2. What are the pros and cons of this approach?
  3. Are there any analogues of this approach?
  4. Is it possible to organize the same thing with webpack?
  5. What can be improved?

I will be grateful for constructive criticism and detailed answers.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Shabalin, 2019-02-12
@nikolayshabalin

First thought. HTTP requests are very expensive. Do you have a lazy-load to avoid loading, for example, a footer on a very long site?
How do you invalidate the cache?
Have you looked at native es6 modules?
In general, I like the idea, but since native modules have not taken root yet, you will have problems with this campaign.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question