Restart render process without reloading the page?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Restart render process without reloading the page?

Postby me12 » Wed Dec 10, 2014 8:19 am

Is there any way to restart the render process without reloading the browser?

Lets say the render process crashes (which happens on rare occasions for us). Would it be possible to restart that render process in OnRenderProcessTerminated without losing any data and without reloading the whole page?

I am asking because we are using a huge single page application where each page reload results in a loss of session data as well as a full reinitialization of the application.

I dont have much hope that something like this is possible since I belive that all JavaScript and other data exists only in that render process, but maybe I am wrong or maybe you have another idea?
me12
Techie
 
Posts: 31
Joined: Thu Jul 10, 2014 12:46 pm

Re: Restart render process without reloading the page?

Postby magreenblatt » Wed Dec 10, 2014 8:39 am

If you store state data in cookies, localstorage, etc, it will be available in the new render process. You can then restore state in your application by referencing that data.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Restart render process without reloading the page?

Postby me12 » Wed Dec 10, 2014 9:03 am

Alright so what you are saying is:

1. Use the localstorage in my web application to store all my data.
2. Once the render process crashes I reload the browser with i.e. browser->GetMainFrame()->LoadURL(browser->GetMainFrame()->GetURL());
3. That would start a new render process
4. My web application is being reloaded and initialized. This is where I am going to reload the data form localstorage

Right?
me12
Techie
 
Posts: 31
Joined: Thu Jul 10, 2014 12:46 pm

Re: Restart render process without reloading the page?

Postby magreenblatt » Wed Dec 10, 2014 10:10 am

That's the general idea. Or, submit the data to whatever your backend is and reload it if/when needed.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Restart render process without reloading the page?

Postby me12 » Thu Dec 11, 2014 2:53 am

Alright thank you Marshall!
me12
Techie
 
Posts: 31
Joined: Thu Jul 10, 2014 12:46 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 95 guests