Modify url in browser using javascript?
<p>Is it possible to change the url in the user's browser without actually loading a page, using javascript? I don't think it is (could lead to unwanted behavior), I'm in a situation where this would be convenient though:</p>

<p>I have a web app which displays reports generated by users. Layout roughly looks like:</p>

<pre><code>-----------------------------------------------------------
 Column 1    |   Column 2
-----------------------------------------------------------
  Report A   |
  Report B   |  Currently selected report contents here.
  Report C   |
</code></pre>

<p>right now the user would be looking at a url like: </p>

<pre><code>www.mysite.com/user123
</code></pre>

<p>To see the above page. When the user clicks the report names in column 1, I load the contents of that report in column 2 using ajax. This is convenient for the user, but the url in their browser remains unchanged.</p>

<p>The users want to copy the url for a report to share with friends, so I suppose I could provide a button to generate a url for them, but it would just be more convenient for them to have it already as the url in their browser, something like:</p>

<pre><code>www.mysite.com/user123/reportb
</code></pre>

<p>the alternate is to not load the contents of the report in column 2 using ajax, but rather a full page refresh. This would at least have a linkable url ready for the user in their url bar, but not as convenient as using ajax.</p>

<p>Thanks</p>
