Francesco
Francesco

Reputation: 25239

Rewrite url ala Google Instant?

I have a e-commerce website built in Ajax and Js, when the user type a search keyword the list is pulled via ajax but the browser url, in my case doesn't change, so if the user reaload or simply bookmarks the address he 'll have to start form scratch loosing the keywords input.

i noticed Google instead rewrites the url with the complete query, no hashtag or complex workaround...apparently

how can i achieve that? consider i have complete control on my server so i can set my apache in any way i want.

thanks!!

Upvotes: 0

Views: 499

Answers (5)

jball
jball

Reputation: 25014

I'm not sure what browser you're using, but I get all the search terms after a hashtag in Chrome (e.g., http://www.google.com/#sclient=psy&hl=en&q=test+test+sibilance&aq=3&...). I don't think what you think is occurring is actually happening. It could be done on Chrome and other HTML5 browsers using history.pushState(), but I don't see Google Instant using that method.

Upvotes: 0

Jeff
Jeff

Reputation: 12418

If you watch the URL in Google Instant, it doesn't change until you hit "Search" or pause for a set period of time (2 seconds, i think).

After this delay, Google refreshes the page with those search queries.

Upvotes: 1

CharlesLeaf
CharlesLeaf

Reputation: 3201

See this question, almost the same except they used Facebook as a example.

Upvotes: 1

smilingthax
smilingthax

Reputation: 5724

My experience is, that after you changed the search, the Google URL is no longer "correct", i.e. it does not represent the latest query.

Upvotes: 0

AndreKR
AndreKR

Reputation: 33678

Then it is not instant. Without reloading the page you can only change the fragment identifier in the URL.

Upvotes: 0

Related Questions