You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user heads over to gallery.html and then deletes an image, two requests happen one DELETE and another GET (line number 169) . Now the GET request is very time-consuming, so we should try to make fewer GET requests.
Solution
When the user first loads the gallery.html, we make one GET request and store the data we get in an array. Each element of an array represent one frame. For deletion, we can simply make the DELETE request and remove the corresponding frame from the array, and also toggle the display of that frame. This will make sure that there is one GET request in that user session.
The text was updated successfully, but these errors were encountered:
gallery.html loads ---> getframes() called with GET request for Getting Frames if (user deletes frame ){ deleteframe() called getframes() again called for fetching again frames }
Now:
gallery.html loads ---> getframes() called with GET request for Getting Frames --->all frames stored in array ---> displayarrayofframes() called for displaying fetched array
if (user deletes frame ){ deleteframe() called
delete that frame from array displayarrayofframes() called }
Description
omg-frames/js/loginsignup.js
Lines 162 to 181 in 332ec82
When a user heads over to gallery.html and then deletes an image, two requests happen one DELETE and another GET (line number 169) . Now the GET request is very time-consuming, so we should try to make fewer GET requests.
Solution
When the user first loads the gallery.html, we make one GET request and store the data we get in an array. Each element of an array represent one frame. For deletion, we can simply make the DELETE request and remove the corresponding frame from the array, and also toggle the display of that frame. This will make sure that there is one GET request in that user session.
The text was updated successfully, but these errors were encountered: