Full static ASP. NET blog site

Source: Internet
Author: User

The Helper home (www.bkjia.com) tutorial now receives a task to create a blog module for a company, requiring full static. That is, not only the blog homepage is a static page, but other sub-pages must also be static, which can make the website safer and reduce the server load and faster access speed!

Since we have previously created websites that generate static pages, we have some ideas for generating static pages. First, we need to create some subpage templates. When posting a blog post, we will generate the corresponding HTML page through the template of this page, which will fix the content of the article and the posting date, and save the address of this page to the database. The number of comments and views in other articles are captured through AJAX in subsequent request pages. There is no problem with this, but I am confused about the blog homepage! In fact, you can update the HTML file of the home page when publishing an article, but because you need to display the number of views and comments on the blog home page, do I have to update the number of views and comments on the homepage HTML page when I access an article or comment? In this way, the static advantage is reduced. Even if you can read these views and comments through AJAX in the same way as on a subpage, you do not know how to replace placeholders when many articles are involved.

Do you have any ideas or demos? Thank you for your answers ~~

The reply content is as follows:
You can try to cache the home page and directly modify the data in the cache when there is an update. After a while, update the database.
The use of static pages is nothing more than for performance. It does not seem to be very effective for security.
Using the cache can meet the performance requirements, and I think the cache is even better than the performance of static pages. After all, the READ memory is faster than the read hard disk.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.