Use cookies without sending them back to the server

I need a way to copy some global data to a browser. If I open a new window with a URL from my application, for example. through a bookmark, I need to access some data that was created in another window and never sent to the server.

As far as I can tell, the only thing that is global for the browser, and not just a window (e.g. window.name), is a cookie. The problem that I am facing is that if I set a cookie, the cookie is sent with each request to the server, but I never want to receive this data on the wire. Is there a way to set a cookie and just use it solely as a bucket to store some data and never send this data to the server?

+5
source share
5 answers

Is there a way to set a cookie and just use it solely as a bucket to store some data and never send this data to the server?

No.

You will need to study the plugin that provides dedicated offline storage, or use the HTML5 storage API, and tell everyone to update their browsers.

If you decide to go for the plugin, as far as I know, you have 3 options:

  • Google gears
  • Flash - it has offline storage - you can write a small flash application for storing things using this tool, and then interact with it from javascript.
  • Silverlight - , , javascript.

, flash, .

, , , silverlight. , . , * - 30% , , .

Google gears, , . flash silverlight , .

* , , , , ..

+1

API HTML 5 , , , , .

+3

, Google Gears? javascript API, , , .

+1

window.opener? , - , , , , / .

0

It looks like your application runs 100% locally, if so, the browser cannot go anyway. Cookies can be easily deleted. If your application is not local, the web server should be the only source of information. Cookies are never the right way to store sensitive information or information that must be stored for a longer time.

0
source

All Articles