- This topic is empty.
April 4, 2017 at 7:07 pm #253427
When running a jQuery ajax request for a random quote using the noted API in Chrome through CodePen, the response always returns the same quote. The pen works fine when using IE11 and Edge, and entering the API call in the Chrome address bar returns a randomized quote as expected.
Anyone have any tips on what’s causing this behavior with CodePen on Chrome?April 4, 2017 at 9:10 pm #253428
cache: falseto the Ajax call…April 5, 2017 at 6:00 am #253431
That was the ticket! Thank you greatly for the help.
Would you be able to explain why setting cache to false was necessary only for Chrome? The prior API I used did not have this issue(I had been using $.getJSON for simplicity, so I assume it employs mostly default arguments)April 5, 2017 at 6:30 am #253433
I can’t really explain, just noticed it did the trick for both Firefox and Chrome.April 5, 2017 at 6:35 am #253434
I’ll add that to my list of web development mysteries, and I’ll have to remember this solution in the future! Again, many thanks. The issue was a big head scratcher for me.April 5, 2017 at 7:23 am #253442
No problem, it’s strange indeed because
falseshould already be the default for caching