Applying Hash History in Built-in Reports Module.

GSoC 2018 : Built-in Reports module — week 3[May 28,2018 — June 03, 2018]

This is the third week of Google Summer of Code 2018. Still, my university semester exams are going on. So, I couldn’t put my full effort here. But I tried my best to manage the time for exams and this project.

Difference between browser history and hash history in react.js

Browser history is generally preferred for modern web pages .Browser history uses HTML5 history API when available, and falls back to full refreshes otherwise. It requires the additional configuration on the server side to serve up URLs. When compared with browser history Hash History is less preferred than browser history. It uses URL hashes, along with a query key to keep track of state. And it requires no additional server configuration.

Browser’s history’s location array contains more than just the locations that have been visited within the application. Allowing access to this list would leak information about a user’s browsing history.Hash History is reliant as it store all of the path information in the hash of a URL.

Hash router is used for the static page websites. Ideal for browser based projects. Dynamic server can handle dynamic URLs, then BrowserRouter is used in such instances.

Browser router failed to redirect while refreshing the pages.

In my progress, Actual problem was occurred when I tried to click a patient row from Patients for a Diagnosis report to go to the patient dashboard. Then I got 404 error when press the back button from patient dashboard to return to built in reports module. The router was not initiated at this page since we fixed the router in the index page of the module.

Built-in-reports module uses BrowserRouter for the routing. It’s fail while refreshing the web page or pressing back button in the browser. I have changed to HashRouter to resolve this issue and now it’s working as expected.

Yes, My third week progress is about these things !!.

And I have done some required changes for this tickets ( RA-1500, RA-1501).

Like what you read? Give Jeyasumangala Rasanayagam a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.