I have developed a Web Interface for a db. The db and Web Interface are for my own use in my hobby running on my private intranet. Currently the db has 1800+ records which is going to increase with usage. Ver 1 of the Web Interface listed all records (~2.5KB) on a single page requiring a ton of scrolling. Vers 2 of the Web interface introduced pagination where records are grouped into a non-fixed size of roughly 100 records. On page load all 1800+ records are still transferred to the client but only the first page is "visible", the other 17 are hidden. I use a series of "non-submit" buttons with JS on-click functionality to hid the current page and make the selected page visible. Better in that scrolling is limited to ~100 records. Vers 3 only transfers the first page and the paging buttons on page load. Now, the on-click function using fetch() API sends a GET Request with parameters to fetch the desired page then swaps it into the DOM. The parameters specify a starting and ending points for the page. These values come from the paging buttons supplied by the server on page load. Works well with significantly reduced data transfer size. In Vers 4 I am generalize the fetch() API GET Request parameters to send user specified parameters to allow the user to choose any page starting and ending point. (Note: The user can not specify a page size directly.) So if the user selects a start and end point that no records fall into my plan is to use HTTP Response Code 204 "No Content" to tell the JS code that there are no matching records and nothing to swap. Is this the appropriate Response Code? Should I be including any other Header information in the Response with the 204 code?
1
There are 1 best solutions below
Related Questions in PAGINATION
- In Datatables, start value resets to 0, when column sorting
- React Query infinite scroll pagination resets to first page
- How to implement pagination on the custom dropdown item's in flutter
- How to modify HTML in WordPress core file
- CakePHP 4 Custom Routing Issue with Paginator Links
- How to set up the link for the paginated files in the Get Rows(V2) Logic App connector and pass it via Azure API call?
- Paging 3 Library with Jetpack Compose Not calling the load method after initial load
- Customising Mui pagination to dots instead of numbers
- Performance degradation in Asynchronous paging
- PrimeNg paginator wont display "Entries per page" or Showing entries per page
- WordPress Pagination not working Properly with Custom Post Type
- Is it possible to programmatically access rows from different pages within a TablePress table that utilizes pagination?
- Pagination does not work in Apollo React Native
- Vue 3 component not rendering on the page
- pagination node.js mongoose express, am I doing it wrong?
Related Questions in HTTPRESPONSE
- .NET httpserver. Get handle new request in current request handler
- Execute rest of the code after Response.End() Alternative?
- Why scrapy shell did not return an output?
- Set response code for compile errors in PHP
- How to ignore null properties in HttpApplication json response in .Net Framework
- What should HTTP 201 response body be when responding to a POST request with large data?
- In C# HttpResponse, when does the response stream starts to be sent to the client?
- Axios Interceptor always return 403 on Post Requests
- Stream content from SQL/DAO to Browser in a File using Spring
- Send a downloadable CSV as response in Next.js
- How to check if Response A has the same content as Response B in the browser?
- MacOS fails to get the file name from download response in ASP. NET Core
- Switchere s2s API Call returns error 404 no matter what I send
- Decoding JSON data from HttpWriter response data that comes compressed or has extra information
- PHP file_get_contents how to get <pre> content
Related Questions in RESPONSE-HEADERS
- How to set up the link for the paginated files in the Get Rows(V2) Logic App connector and pass it via Azure API call?
- Simple proxy to change Content-Disposition header (AWS Preferred)
- Remove server header in IIS 10.0 when the subfolders in the request path are more than the maxUrlSegments attribute (default value 32)
- Content-Disposition HTTP Header
- Duplicate response headers with same values in IIS 8
- Link rel="preload" not working for assets loaded within iframe
- Using serve-handler to update custom headers
- Cargo website customize css for mobile only
- How to fetch response header data in nextjs?
- How to get headers from response of a server route
- Where are the exposed headers informing my Rate Limit for the Geni API?
- Why did my menu disappear when I added styles for my carousel?
- Adobe Target: Unable to load all site elements in the editor
- Open Api generator doesn't add any information about response headers to generated code
- Error: Parse Error - Invalid header value char in Node.js
Related Questions in GETPARAMETER
- Is it possible to compose quick "Add Education" button to LinkedIn like you can with licenses and certifications?
- Unable to capture Parameter value from AWS Parameter Store if executed from the Cypress Tests(Mocha blocks)
- Purpose of tilde delimited values in URL fragment instead of GET params
- Populate VueSimpleSuggest from URL param on page load
- request.getParameter returns null for form data sent using jquery ajax in tomcat10 servlet
- How to take a value from span tag to scriplet tag
- Htaccess URL rewrite with get parameters
- Best way to block XSS injection having decode and getParameter
- 301 redirect from URL with GET-parameters to the homepage
- How do I get the id from a post in a function in react-navigation v5 like this?
- Django How to get GET parameters in template
- What's the appropriate Response Code for a Pagination API using a GET Request with page parameters, where the parameters produce no records?
- Read Env Vars from a File in AWS Elastic Beanstalk during deployment
- Receive a parameter between screens React-Native
- How to get parameters from CloseableHttpResponse
Related Questions in HTTP-STATUS-CODE-204
- Slim Framework returns 204 with 5 extra new lines and tab
- How does browser caching handle hotlinked images + 204 responses?
- Flask abort() with custom http code
- Android Volley library not working with 204 and empty body response
- How to make test code for HTTP 204 No Content in Android, Rx
- Google scripts, using urlFetchApp() for PUT request, I cannot get a response code when server sends 204 no content response
- How to handle "204 no content" response with Retrofit after logout?
- dotnet-isolated azure function container loads 0 of 1 function from metadata and then gives http status 204 (content not found)
- django http response 204 redirecting to blank page only in safari
- 404 vs 204 on GET, PUT, DELETE Methods
- Can a POST request be redirected as another GET request
- Warning: Couldn't read data from file
- Karate - How to set HTTP status to variable from When step?
- Google docs viewer returning blank screen (204 response) sometimes
- Nginx cut-off Content-Type header in responce id http status is 204
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Take a look at what the RFC says about 204:
https://www.rfc-editor.org/rfc/rfc7231#section-6.3.5
It's really intended for PUT requests. I think for what you are doing, it's fine to return 200 and no body, with a Content-Length header of 0.