How much ajax is too much
Generally speaking, in my experience, you want to avoid any Javascript on your page that you can. By this I mean, if you can do it on serverside instead of with Javascript then you should. Your page will load faster and you'll just have a better user experience. That can sometimes be more work, particularly if that same on-load AJAX call is used during the page at later points. You might be duplicating code by doing it serverside. So there's a tradeoff between performance and how much code you want to write.
The other aspect to this is that Javascript is sometimes used defensively against bots, scrapers, malware like keysniffers and so on , etc for both your security and that of the site. This can mean, for example, loading page elements with Javascript simply because it makes it harder to hack or scrape.
Not impossible midn you, just harder. Is too much Ajax a bad thing? Asked 1 Month ago Answers: 5 Viewed 10 times. I suppose what I'm asking is there any downfalls to heavy Ajax usage in a web pages? Obviously, too much is not good. But AJAX has a good experience with some backstage flips and message notifications. If it is separated from the front, AJAX is the key way to communicate with each other. What you need to deal with is the asynchronous control flow of ajax.
What are the negative effects of using too much Ajax? There are ways to mitigate this problem. For example, the script can artificially insert data into the history list so that when the back button is pressed, the application state is reverted to simulate the expected back behavior. This is what is done with Google Maps. A similar problem exists with bookmarks.
When bookmarking an AJAX page, the state of the given application is not bookmarked; only the address of that application is bookmarked. The user can attempt to bookmark a page that is several steps deep into an application flow, but when that user returns to the bookmark, he or she is placed at the starting point in the application. This can be very confusing. Again, there are some workarounds.
When the bookmark is created, the script to add the bookmark can dynamically add a fragment to the URL to preserve some state information. Then when the user returns to this bookmark, the application state can be restored, placing the user in his or her expected place in the application.
The final drawback of AJAX is that it can actually cause degraded user performance if improperly implemented. The nature of AJAX is to shift the computing load from the server to the client computer. The optimum compute allocation, on the client or server, must be determined based on relative computing power. If too much burden is put on the client's Web browser in processing long and complicated scripts, then the AJAX application can actually perform more slowly than the traditional page-based application.
Web pages are a common method for implementing UI and applications. Powerful graphics and interaction capabilities can be implemented in a way that's accessible to a broad community of designers. AJAX has the additional benefits of enforcing good application design by separating data and its presentation. As we are already seeing today, this paradigm will move from the Web to desktop applications.
Likely this will appear first in embedded systems, where applications can be less complex and the ability to quickly create a graphically rich UI is desired. The entire device UI can be implemented in a Web-browser paradigm. Sixthly , The same origin policy prevents some Ajax techniques from being used across domains, although the W3C has a draft of the XMLHttpRequest object that would enable this functionality.
Seventhly , Like other web technologies, Ajax has its own set of vulnerabilities that developers must address. Developers familiar with other web technologies may have to learn new testing and coding methods to write secure Ajax applications.
Lastly , Ajax-powered interfaces may dramatically increase the number of user-generated requests to web servers and their back-ends databases, or other. Finally , i will not say that ajax is bad but as Daniel commented, "Too much" is always a bad thing is true. Facebook is one of website which uses huge ajax but in a proper way. Many solutions to above problems have been implemented. For example, using invisible iframes allows the retrieval of history data.
URL fragment identifiers let users bookmark and return to a particular state of an application. It also supports back-button functions. Personally, I'm fine with much Ajax as I encounter as long as long as works properly and fast and doesn't break my behavior.
More specifically, I want to be able to email a link to a specific page, bookmark it -- the usual stuff. If you're creating web application then using AJAX is a good thing. But if you want search engine to to find every word on your page, using AJAX will make it difficult. Than it would be too much.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Is too much Ajax a bad thing? Ask Question. Asked 10 years ago. Active 10 years ago.
0コメント