localStorage file or Cookies from a local html file(file:///C:/index.html)

1,656 views
Skip to first unread message

Majid Akbari

unread,
Oct 1, 2017, 2:24:49 AM10/1/17
to Chromium-discuss
I need a way to set health status on the local computer when chrome is running my index.html from a local directory without any web server (file:///C:/index.html).
I have a C# console application and a very simple HTML file to show some content in the google chrome. To check my page in google chrome is working properly without any crash or error, I need to set some health checker to talk to my console application. It'll run on a Windows computer which doesn't have an internet connection.
 I'm trying to options:

A) Cookies: In the local mode, chrome doesn't cookies so I cannot use it. I tried "--enable-file-cookies" but it seems it is deprecated.

B) localStorage: Hopefully localStorage is working but I cannot find the " .localstorage" file in "...\AppData\Local\Google\Chrome\User Data\Default" folder.

Please help me to find the local storage file for local HTML files or suggest me another solution.

PhistucK

unread,
Oct 1, 2017, 2:32:10 AM10/1/17
to ronal...@gmail.com, Chromium-discuss
The situation you are describing here sounds exactly like the solution for which the web is designed - browser-server communication. Or am I missing something?

Are there three parts here? The console application (say, server), the HTML page (say, browser) and a health checker (an intermediator? What is this and what does it do exactly?).

If you are discussing cookies and local storage here because you intended to modify the underlying files of the browser to include your information - this is a bad idea as their structure can change at any time.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Majid Akbari

unread,
Oct 1, 2017, 10:55:13 AM10/1/17
to Chromium-discuss, ronal...@gmail.com
The console application is there just to make sure the chrome is working properly because after a few hours (sometimes) my page crashes and chrome shows crash page. So, I'm creating a console application to check chrome is working or not. So, because of that, I think I can use Cookies or localStorage file. Another thing is, I cannot install a web server like IIS or Node.js on the local computer. 


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

PhistucK

unread,
Oct 1, 2017, 11:06:33 AM10/1/17
to Majid Akbari, Chromium-discuss
You can use a lightweight standalone static server, though. I saw ones that weigh less than a single megabyte.
Alternatively, since you are using Windows, you can even use Powershell alone to create a small, lightweight is-it-alive server -
Once it does not get requests for two seconds (or whatever), launch Chrome again.


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Majid Akbari

unread,
Oct 2, 2017, 2:58:38 PM10/2/17
to Chromium-discuss, ronal...@gmail.com
Phistruck,
Thank you so much. It was a smart idea. I've created a lightweight web server with PowerShell on the local computer and communicate with that. 


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Reply all
Reply to author
Forward
0 new messages