Good afternoon. We want to make more efficient internal form post in a Web site have a lot of trafic. With internal posts I am talking about the information the user didn't introduce directly in this page, I mean, the information is used for the system. My boss told me search if is better use jquery or AJAX for that. By the way, I am learning jquery so please excuse me if I say some wrong think and please lets me know my mistake. I have been googling but I only saw how to do ajax's posts through jquery. What do you think is the better option?? Summarizing: we want many of the post happen in the user's computer. We will be really gratefull for any comment, suggestion, etc.
While I'm having trouble making sense out of what you are even asking for -- if it's something you'd do with AJAX, if you are going to use the fat bloated idiotic bandwidth wasting steaming pile of manure known as jQuery, it's still going to use AJAX to do it. Though in case you couldn't tell, I'd suggest doing it without jQuery... and make sure you make it work WITHOUT javascript of any sort (jq or no) FIRST. Generally speaking if you can't make a simple form work without scripting FIRST, you have no business making a form on a page. Though by the time you make it work without any scripting, you might realize "why was I thinking on adding scripting to this?" Just remember, Javascript (goofy librarys or not) should enhance the functionality, not supplant it.
Hi. Thanks for your answer. Well, that Web site have been working for years ago. The thing is we want to reduce the work of the servers. Fot that I want to use javascript, because with that I can give part of the job to the user's computers. I don't know another good technologie for that. But if you know a better option please lets me know. Please, I need it. Now I am thinking in use the javascipt option session storage for reduce the work in the server. What do you think abour that??
Well, without seeing the site in question that's hard to say -- USUALLY no matter what the scripttards will try to tell you, caching or no, throwing more code at it is rarely the correct answer. More often than not if AJAX on a form is going to "save bandwidth" there is likely something wrong with the form -- false simplicity from garbage like placeholder (or worse scripting to fake it), lack of proper semantics and clear labels confusing users, etc, etc. Even with AJAX assist EVERY check should be run again server side, so the only time AJAX would save you any server load (since it's the same number of requests) is when the user fails to fill out the form correctly... ... and if they're filling out the form incorrectly often enough for there to be enough failed submits for it to matter, well... what did I say about false simplicity from "placeholders" and unclear labels with broken semantics? There MUST be something wrong with the form at that point. Of course, if you've got bloated code in place already -- like a hundred K of markup doing 10K's job, you'll see more benefit from the "Let's throw javascript" at it nonsense than you would if you just gutted the page down to something actually useful to visitors and practical to host. But that's guessing wildly, I'd have to see the page in question first... But if it's non-semantic markup, bloated markup, little if any separation of presentation from content, and isn't leveraging caching properly (and I'm NOT talking about dicking around with that cache-expires idiocy) throwing more code at it likely isn't the right answer.