Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Hash params are useful for single page javascript applications, it allows javascript to present the user with a sharable url for state of the application. This is preferred because if you have a single page javascript application and users navigate and load more content via ajax and share the url, without the hash or a push state modification the person receiving the content would get the homepage or starting state. Hash params can be amended easily and read by javascript without reloading the page.</p> <p>Hash parameters are usually only used on the client side, hash params wont be passed to the server... so they are only useful for parameterization to the client.</p> <pre><code>/users#!/13 </code></pre> <p>would load the user index page and then javascript could read the hash</p> <p><code>window.location.hash</code> and pass it through some sort of client side router and make an appropriate ajax request and possibly load the user show template and push it to the dom.</p> <p>Url params and url path are somewhat interchangeable. People usually use url path for describing restful resources such as</p> <pre><code>/users/[:id] =&gt; /users/13 =&gt; /users?id=13 /users/:id/posts =&gt; /users/13/posts /users/:user_id/posts/:id =&gt; /users/13/posts/22 etc...... </code></pre> <p>@Walter Tross, made a good point from an SEO point of view. Slugged urls or "URL Params" are more indexable by crawlers and tend to rank higher.</p> <p>For params that do not fit in a resourceful route we send them as params</p> <pre><code>/users?sort=user_name&amp;order=asc </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload