How to suppress callback for jQuery Ajax request?

When a user searches for something on my site, I want to log the search term. In the click event handler for the search button (on the client side), I am calling a function which logs the search term by making an AJAX request. I then load the search results page. The request to load the search results page is not made until the AJAX request to log the search term finishes. How can I speed it up? Can I suppress the callback for AJAX complete event? Thanks in advance.
If you're loading a new search results page, why use AJAX at all? Just log the search term server-side at the head of your the results page.

以上就是How to suppress callback for jQuery Ajax request?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准