My php functions need to do some work with the database to generate the sidebar content, so I want to load it just once. Plus I’ve read that one should avoid using frames. So what should I do? Use ajax / synchronous-jax?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d say the simplest and plainest way to pull this off is to use frames. This is pretty much what frames were made for. The only real concern is search engine optimisation, so if that’s not an issue (say, you’re making an administration panel) then go with the frames. If you’re using this for a public website then you should probably look for another way of doing it.
You could also just cache the sidebar on the server so it doesn’t matter how many times it’s loaded. That would sort of avoid the whole issue, don’t u think?