I would like to keep the contents of large user interface lists cached on the client and be updated according to criteria or regularly. The client code can then simply populate the drop-down lists locally, avoiding lengthy page loads.
These lists may be close to 4k elements, and dynamically filtering them without caching will lead to several rather large round trips.
How can i do this? I mean, which templates and strategies are suitable for this?
JSON , JS URL-, , . :
/media/js/ac.js?1234ABCD
, .
/media/js/ac.js?4321DCBA
, , URL-, 304 Not Notified ( , ). , , , "" , .. JS , , 304, 200.
ac.js , , , JS.
, , . - memcached server-side gzip compression, , . (, ), .
Combres - - js , , URL- .
http://combres.codeplex.com/
jQuery AJAX . , .
.
:
http://think2loud.com/using-jquery-and-xml-to-populate-a-drop-down-box/
If its fair text data, you have enabled compression on a web server and have less than 100 elements, then it may not be necessary to maintain lists in the client script.
It’s usually best to put all your data (list items - data) in one place, so you don’t have to worry about synchronization.
Source: https://habr.com/ru/post/1744828/More articles:highlight PHP navigation - highlightingЕсть ли какой-нибудь звуковой SDK, который работает с .NET? - c#Prevent header update after reloadData call? - objective-cInsert data into SQL server with better performance - c #C ++: replacing elements of a template class of different types? - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1744829/listing-like-appstore-in-firefox-or-any-other-browser-for-windowsdesktop-linux&usg=ALkJrhgw2p-jP-RA3R7Yml8yhF32iKPyTQprint web page in two columns - javascriptImplementing PyMyType_Check methods with the Python C API? - c ++Batch build using IAR tools - buildHow to effectively replace a vector of identifiers with a vector of corresponding numerical values - matlabAll Articles