How can I detect an address bar change with JavaScript?

HTML5 introduces a hashchange event which allows you to register for notifications of url hash changes without polling for them with a timer. It it supported by all major browsers (Firefox 3.6, IE8, Chrome, other Webkit-based browsers), but I’d still highly suggest to use a library which handles the event for you – i.e. by … Read more

Turn off URL manipulation in AngularJS

Not sure of the side effects of this, but it gets the job done. Note that it will disable all location manipulation from the angular app, even if intended. angular.module(‘sample’, []) .config( [‘$provide’, function ($provide){ $provide.decorator(‘$browser’, [‘$delegate’, function ($delegate) { $delegate.onUrlChange = function () {}; $delegate.url = function () { return “”}; return $delegate; }]); … Read more

Open new popup window without address bars in firefox & IE

Firefox 3.0 and higher have disabled setting location by default. resizable and status are also disabled by default. You can verify this by typing `about:config’ in your address bar and filtering by “dom”. The items of interest are: dom.disable_window_open_feature.location dom.disable_window_open_feature.resizable dom.disable_window_open_feature.status You can get further information at the Mozilla Developer site. What this basically means, … Read more

Is there a way to change the browser’s address bar without refreshing the page?

With HTML5 you can modify the url without reloading: If you want to make a new post in the browser’s history (i.e. back button will work) window.history.pushState(‘Object’, ‘Title’, ‘/new-url’); If you just want to change the url without being able to go back window.history.replaceState(‘Object’, ‘Title’, ‘/another-new-url’); The object can be used for ajax navigation: window.history.pushState({ … Read more

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