Jump to content

Welcome to NulledBlog
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

AJAX + oninput solutions?


  • Please log in to reply
2 replies to this topic

#1
xXMuM3NRiiD3RXx

  • Offline
  • Posts:
    1,583
    Reputation:
    1266
    Joined:
    05 Jun, 2015

Hey, tried out AJAX today.

But I am having some issues.

 

By using oninput, HTTP requests are constantly being made, which is a waste.

By adding a delay, it doesn't look too good but reduces the amount of requests.

 

Keep in mind I am getting information from a database, so it has to create a connection all the time.

 

What would be the best approach? By just using a button with onclick?

Or is it normal to have many requests from a single session?

 

Anything else?

 

Let me know!


  • 0

#2
m1st

  • Offline
  • Junkie

  • Posts:
    301
    Reputation:
    -10
    Joined:
    29 Oct, 2015
It is probably best to use onclick, to reduce requests and increase speed, but still deliver the content
  • 1

#3
xXMuM3NRiiD3RXx

  • Offline
  • Posts:
    1,583
    Reputation:
    1266
    Joined:
    05 Jun, 2015

It is probably best to use onclick, to reduce requests and increase speed, but still deliver the content

 

I see. Is there no way to load it once, have it saved somewhere, and then filter? (Using more JS)


  • 0


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users