Friday, October 18, 2013

SEO: Hash bang vs Push state/Replace State Html5

SEO in simple terms ensure the web page ranking and indexin for search engine. In order to do so we built our web pages to align to that standard and rules to be SEO non agnostic. Tags, Keywords, meta data and page state helps to get into top of the search list and there we called is is SEO compliant.

Hash # in website URL helps enables interactive within page. It helps locate quick element and navigation across page scroling without having to make a request back to the server. With this we can manipulate browser history when moving forward and backward due to which overall segment of SEO is defeated. To resolve this Google came up with workaround of Hash # Bang ! in url
sample link http://well.com/#!/User1

Now it is not a standard but solution to work with SEO on hash issue. We do heavy duty at backend code in server to check “_escape_fragment_” This is again one of the problem in terms of processing and latency.

Looking into all this HTML5 Push state is good solution to above problem

For such URL http://example1.com/#images1/1 to tell a JavaScript application to load image #1 on to the screen, can be given as URL: http://example1.com/images1/1 – with no Hash at all

pushState(data, title, url)
replaceState(data, title, url)

window.history.pushState(state, state.title, "detail.aspx?article=" + article);



 

No comments :