[wp-trac] [WordPress Trac] #38911: Prevent Media Library search making an AJAX request for each char typed.
WordPress Trac
noreply at wordpress.org
Sat Jan 7 23:31:00 UTC 2017
#38911: Prevent Media Library search making an AJAX request for each char typed.
-------------------------+-------------------------------------------------
Reporter: | Owner: adamsilverstein
brandomeniconi | Status: assigned
Type: enhancement | Milestone: Awaiting Review
Priority: normal | Version: 4.6.1
Component: Media | Resolution:
Severity: normal | Focuses: javascript, administration,
Keywords: has-patch | performance
-------------------------+-------------------------------------------------
Comment (by adamsilverstein):
@aidanlane I see a search request on every keystroke without this patch.
I looked into the existing 1000ms debounce i mentioned in media-grid -
that is actually used to reset the search url in the browser... if you
type a search (without the patch), you will see the ajax request fire on
every key request, then when you pause typing, the search is added to the
url after 1 second of not typing.
Here is a screencast with the console open showing the excessive ajax
requests:
[[Image(https://cl.ly/1r1U2z212M0n/Screen%20Recording%202017-01-07%20at%2006.28%20PM.gif)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38911#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list