Recommended Technology for Fetching and Displaying Content [closed]

General Tech Technology & Software 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Technology & Software related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago


I'm working on a website focusing on animals that's driven by PHP and MySQL. Each species page with tentatively feature a brief introduction, followed by a series of section titles:

Classification Distribution Anatomy Diet, etc.

So imagine we visit the page MySite/Animals/Wolf. If there's an article in my database about Wolf Anatomy, then I want that somehow indicated on my page. A visitor can then click a button or link, and the article will appear under the heading Anatomy.

I'm not talking about content that's "hidden" in the html. I don't think I want to go that route, because the page should load faster if the content doesn't appear at all unless a visitor requests it.

Anyway, what's technology can I use to make content (presumably stored in a database) appear on a page when a visitor requests it?

Thank you.

profilepic.png
manpreet 2 years ago


As u_mulder said, you probably want to load some content on demand via AJAX request.

So when a user clicks the link, you fire of an AJAX call that gets the content you'd like to display.

It sounds to me though that you may be better off loading everything when the user gets to the page initially instead of going the AJAX route. Unless the article you want to get is hundreds of pages and has tons of images, I'd prefer the content to display immediately on page load instead of going the AJAX-route which always means a little delay on click. If the article you talk about is just text and only a couple of pages, the effect on page load time is negligible and there are tons of other things to consider first before trying to shave off a couple of bytes by not loading some text. Also keep in mind that search engines won't discover your AJAX-loaded content unless you make provisions for that.


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.