Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm developing a site in which the user can create his set of questions and asnwers. I'll have some datas, for example:

Question1: "What's your name?";
Right answer: "Emiliano";
Wrong answers: ["Luke", "Mathew"]

Question2: "What's your favourite color?";
Right answer: "Green";
Wrong answers: ["Blue", "Black"]ù

...and so on.

and I want to give to some users the chance to create their own test. My solution has to be focus on the performance (in my last quiz-site I had 10k users online at the same time). How can I do? I've thought I can generate static html pages from my data (this is how we've done since now, but since now our quizzes were generate by us and not by users, so we generated like 2 quizzes per day and in these two times we were able to use some expensive-performance tool like php). I've read I can use node.js to generate my pages server-side, but there's some way to generate them client-side? I don't want to use my server as long as I can.

I need to generate page like

www.mysite.com/user-name/1.html

www.mysite.com/user-name/2.html

www.mysite.com/user-name/3.html

www.mysite.com/user-name/result.html

In which 1.html contain Question1 data and so on.

Also, let me know if I can do this in another "simple" way. Thank you and sorry If I've written some meaningless things (in case, let me know what mistake I've made), first week on Javascript (and coding).

share|improve this question
    
Have you tried AngularJS? –  IsabelHM Jan 17 at 16:26
    
No, will it be useful for me? –  Emiliano Negri Jan 17 at 16:28
    
Ah I see. Just saw your edited explanation. –  IsabelHM Jan 17 at 16:31
    
Use document.create it allows you to create elements in javascript. You can append these elements to the DOM using element.appendChild –  Mouser Jan 17 at 16:44
    
@Mouser, I need to create a complete new html page, like mysite.com/DynamicName/1.html. –  Emiliano Negri Jan 17 at 16:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.