How to dynamically change URL without reloading?


This question already has an answer here:


Your problem can be solved by implementing the History API, especially by using the pushState() method. I recommend reading about it in MDN. There's also an all-in-one solution called History.js, it will help you implement it x-browser easily (It will fallback to URL hashes # if the browser doesn't support it).

Here's an example:

history.pushState('', 'New Page Title', newHREF);

Not excited enough? Here's a demo that will encourage you to implement it.

I just found a tutorial and it worked for me,

var value = $(this).attr('id');
window.location.hash = value; // it appends id to url without refresh

$(window).bind('hashchange' function() {
    var newhash = window.location.hash.substring(1) // it gets id of clicked element
    // use load function of jquery to do the necessary...

i got the above code from

Need Your Help

Protocol buffer objects generated at runtime

java protocol-buffers

a colleague of mine came with an idea of generating protocol buffers classes at runtime. Meaning:

Appwidget size calculation

android android-4.0-ice-cream-sandwich android-3.0-honeycomb android-appwidget android-2.3-gingerbread

It might be me, but when I calculate minimum app widget sizes according to the formula given on the android page I don't get the right widget widths; The formula is as follows: