Jammming Page refresh after first song search

I completed the Jamming project and was able to build it with surge. The link to this app is: http://time-to-jam.surge.sh/ .

My issue is that after a user authenticates their Spotify account and then refreshes the page, the first search results in a list of songs that then vanish or they don’t appear at all. However after this first search all of the songs show up as they should from there on out. Only after a user refreshes the page and tries to search again does stuff vanish or the page refreshes itself.

I found another classmates project on Github and opened it and found that they also had the same issue. Is there a way to avoid this?

1 Like

hi Alex,
AJAX requests like fetch() are cached by browsers. To check this try input a new name of song or artist which you have never inputted before, you will see the error.

Hi! I have the same problem. Inputting a new artist/song doesn’t help. Is there another way to fix it?

Can you link a source where you explain a bit more? I have this problem and i dont know how to adress it in order to solve it

1 Like