M
M
MAXH02015-11-25 20:25:27
CMS
MAXH0, 2015-11-25 20:25:27

Static site + Ajax commenting system. What are the pitfalls?

I am creating my own website.
I decided to choose a static generator for it (WP disappointed me). BUT without dynamics the site is dead by today's times.
Solution The system of commenting, feedback, forms, etc. on Ajax on the client side and PHP on the server. How do you look at such a hybrid? Or don't sweat it?

I understand that for the purity of the picture you need Node.js on the server ... BUT hosting is many times more expensive.

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2015-11-25
@MAXH0

FS as storage is a really working and fast solution in the "direct" hands of the coder.
Easy: the final rendering (HTML section) of each article, along with comments, is saved to a cache file. When data changes, we update the cache file of a specific article.
As a result, the order is:
1. POST: New data (new post, comment) -> render HTML code -> save to cache file.
2. GET: Request for output -> HTML from the cache file -> general site template.
Also, it is even faster: organizing a server system session for intermediate storage of dynamically calculated results. For example, the results of commonly used search queries or filters.

S
Stalker_RED, 2015-11-25
@Stalker_RED

You can connect external comments from Disqus , for example. And there is plenty of feedback for everything. And the site will remain true-static, but at the same time with goodies.

B
Big_person, 2015-11-27
@Big_person

I use http://cackle.me/ Russian analogue of discus. It is possible to upload content to your database and display it on the site without js for normal indexing by search engines

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question