3 ms·
Thanks for the feedback! The reason I decided against AJAX on the currency switcher is so folks would see the GET variable in the URL and know that they can b
by elbrian 13y ago
Thanks for the feedback!
The reason I decided against AJAX on the currency switcher is so folks would see the GET variable in the URL and know that they can bookmark it if they want to always see a currency besides USD.
In the upcoming weeks (once I have more than 5 currencies supported) I'll be looking for a way to AJAXify the experience while still making it apparent that you can bookmark the site with a specific currency pre-selected.
I've considered putting cookies in there, as well, but decided against that for the sake of reduced load times and keeping things as straightforward and lightweight as possible.
- got2surf 13y agoYou can do something like this to change the URL without reloading page, and then just use AJAX for the currency switcher: window.history.pushState("Updating URL to ___", "Title", "/?currency=USD");
- elbrian 13y agoPerfect! I'm going to implement this tomorrow morning. Very glad I posted this here. You guys rock. EDIT: Just got it working. Thanks again for the pro advice!