Last Updated: February 25, 2016
·
2.711K
· eddie_ruvalcaba

Refreshing the current url in BackboneJS

I've been using BackboneJS for a short time but recently came up with a problem when I was trying to reload the current url. After looking for an answer I came up with a post by Eric Bae.

Backbone.history.loadUrl( Backbone.history.fragment )

What this line of code does is grab the history saved by the url and force to load it by passing it to the loadUrl method. This hacked has been working for me and I hope it works for you too.

1 Response
Add your response

Thanks it was really helpful.

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside