Why does Twitter use a hash and exclamation mark in URLs, and how do they rewrite search URLs?

It’s become the de facto standard that Google has established to ensure consistency and make ajax urls crawlable. See http://code.google.com/web/ajaxcrawling/docs/getting-started.html I believe they are using history.pushState. You can do history.back() in the console and it’ll lead you back to the page.

What are the differences between history.pushState & location.hash? [closed]

location.hash has a better support than the history.pushState method. The advantage of the pushState method is that you can bind a state to the history entry. If you don’t need this state object, I recommend to use the location.hash property, to have better compatibility with older browsers. location.hash=”new-hash”; console.log(history.state); // null or undefined history.pushState({extraData: “some … Read more

Encoding of window.location.hash

Unfortunately, this is a bug in Firefox as it decodes location.hash an extra time when it is accessed. For example, try this in Firefox: location.hash = “#%30”; location.hash === “#0”; // This is wrong, it should be “#%30” The only cross-browser solution is to just use (location.href.split(“#”)[1] || “”) instead for getting the hash. Setting … Read more

Remove fragment in URL with JavaScript w/out causing page reload

As others have mentioned, replaceState in HTML5 can be used to remove the URL fragment. Here is an example: // remove fragment as much as it can go without adding an entry in browser history: window.location.replace(“#”); // slice off the remaining ‘#’ in HTML5: if (typeof window.history.replaceState == ‘function’) { history.replaceState({}, ”, window.location.href.slice(0, -1)); }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)