Reload page in javascript

To reload a page without re-posting, you may have seen something like:

location.href = "" + location.href;

This doesn’t work if there’s a hash in the URL. Instead, do this:

location = location.href.split("#")[0];

Comments

Popular posts from this blog

C# Record Serialization

Add timestamp to photo using ImageMagick

Read/write large blob to SQL Server from C#