Cors errors / performance issues on view based GET

I am currently having two issues and am trying to determine if they are related. I have JS running in my app to make a view based GET call to the knack API every 3 seconds to check for certain parameters within a table. If the parameters are met, the script adds a CSS class to a menu button and leaves it there until the parameters are no longer met. The script runs fine until a couple hash changes in the URL and the css begins to take longer to get applied to the menu button on each hash change. I do have to call on a 5 second setInterval. I was told to be careful that the setInterval function doesn’t begin to cause stacking. I do believe that this could be this issue with the slow css, just not exactly sure how to fix the stacking issue.
The other issue is that after a few hash changes or if the page is left long enough it will begin to throw these Cors errors in groups of three in the Chrome DevTools console (see below).

Not long after these groups of errors come in over and over again, I begin to get these extremely long errors which look to be more cors errors but the URL now has the filter parameters duplicated many times over (see below).


Wondering if anyone has any experience with this and might know if these issues are related or not. If anyone has any ideas on how to get these issues resolved, the help would be greatly appreciated!
Thank you.

1 Like