Bookmarklet to make session cookies expire later

Background: There are several sites that I visit regularly on my iPhone that require me to log in. Unfortunately, the sites set cookies that expire at the end of the session. This unfortunately means I end up having to log in up to a dozen times per day.

I would like to write a bookmarklet that will go through and change all my 'expires at end of session' cookies to 'expires in 1 week.' I'm new to JavaScript/bookmarklets (I am a C++/C# programmer)... so I have a feeling this might take me a while. I just wanted to consult with experts who might be able to tell me if this is feasible/possible at all to begin with. I don't want to end up wasting my time if it's not even possible to accomplish this via JavaScript. (and if it matters, I use 'Atomic Browser' on the iPhone which does have bookmarklet support)

-------------Problems Reply------------

Well, there are bookmarklets that allow you to view all cookies set by the current site, so I don't see any reason why this wouldn't be possible. If anything, you'd just need to enumerate/grab all the cookies, and then re-set them using a new expiration time/date.

Category:javascript Views:1 Time:2010-07-07

Related post

  • How to make an ASP.NET session cookie expire with the ASP.NET HttpSession? 2008-12-07

    I have created an HttpCookie in order to share data across a subdomain : HttpCookie cookie = new HttpCookie("sessionGUID"); cookie.Value = value; cookie.Domain = ""; Response.Cookies.Set(cookie); I carelessly assumed since it is a 'sessio

  • Set Rack session cookie expiration programatically 2010-06-16

    I'm using Rack to try to implement "Remember Me" functionality in my Sinatra app. I'm able to set the session cookie to expire when the session ends or in X seconds time but I'd like to do both. For example, if a user has clicked "remember me" then I

  • .net HttpCookie class / session cookie questions 2009-03-10

    I am interested on how to make a regular HttpCookie object into a cookie that expires at the end of a session. I am not interested in someone showing me HttpContext.Session. How does a session cookie look in the response headers compared to a normal

  • Session cookies across browser processes 2009-11-18

    Is it possible to use session cookies across browser sessions (specifically Internet Explorer). I would like a user to log in to my site and therefore get a cookie and when the user opens another IE process have that session cookie authenticate the u

  • How to (if possible) set and unset session variables/ stop session cookie overwriting? 2011-11-04

    For background, here's my scenario: I'm building a self-hosted platform for a particular niche, and part of that platform is the login process, which if validated sets a session for the user. On every administration page load, the session is started

  • Session Cookie will not set correctly 2012-02-09

    I have all the ini_set variables correctly set for a 30 day cookie, the Session_cookie_params is the same way, yet everything I do still has the session cookie expiring when the browser closes. Any help here? --------------Solutions------------- Make

  • Session Cookies not deleting after all browser instances are closed 2012-02-23

    If a session cookie is a cookie without an expiration date, and session cookies expire when the browser is closed, then why are these cookies remaining on my computer? I have cookies on my computer that were created as many as 5 days ago that have"no

  • How do I set cookie expiration to "session" in C#? 2009-11-22

    Self-Explanatory. In PHP, the solution would be to set the cookie expiration to 0; I'm unsure about C# since it requires a DateTime value. --------------Solutions------------- The docs for Cookie.Expires call it right out. Setting the Expires propert

  • Setting cookie expiration with ASP classic to ASP.NET session sharing solution 2010-06-25

    I'm implementing the session sharing structure from this link for an ASP classic site to begin the gradual conversion process to ASP.NET. I'm trying to extend the cookie expiration time so that users do not get signed out of the site when the session

  • PHP Sessions Not Extending Cookie Expiration on Each Request 2010-09-24

    Is session_start() supposed to extend the life of the session ID cookie by the session.gc_maxlifetime variable? My session.gc_maxlifetime is 24 minutes, and each session is only living 24 minutes regardless of additional activity on the site. I get m

  • C# HttpListener Cookies expiring after session even though expiration time set 2011-01-26

    I have a HttpListener class for handling logins to a page, and can successfully set the cookie, but the cookie is expiring at the end of the session (using cookie extension in Chrome, shows cookie is a session cookie). Here is the code snippet: Cooki

  • PHP custom session mechanism - and cookie expire problem 2011-06-18

    I'm using session_set_save_handler() to keep my session in Redis, and everything works perfectly, except one thing. after hours and hours of pulling my hair I thought I should just ask someone. so, on the server side, I set the session life for X min

  • Issue with cookies / expiring session 2012-03-27

    I have users who write articles and when they leave there computer for a while and come back then submit a post the author / user_id is recorded as a NULL value. I'm assuming the session is expiring. I have: ob_start(); session_start(); if(isset($_SE

  • My Javascript cookie expires at session, not in 30 days 2012-04-24

    jQuery(document).ready(function(){ if (document.cookie.indexOf('visited=true') === -1) { var expires = new Date(); expires.setDate(expires.getDate()+30); document.cookie = "visited=true; path=/; expires="+expires.toUTCString(); jQuery.colorbox({open:

  • Cookie less Session not expires after closing IE 2012-05-02

    I change my sessions setting in web config: <sessionState cookieless="true" timeout="20" mode="InProc" /> and when I copy my address and close IE and then I enter address in another IE instance session not expires. What can I do for expiring se

  • How to disable PHP session cookie? 2008-10-27

    I am writing PHP code where I want to pass the session id myself using POST. I don't want a cookie to store the session, as it should get lost when the user gets out of the POST cycle. PHP automatically sets the cookie where available. I learned it i

  • How to redirect to LogIn page when Session is expired (ASP.NET 3.5 FormsAuthen) 2009-03-17

    I'm using FormsAuthentication and ASP.Net SqlMembership Provider. I would like to provide a functionality to redirect to LogIn page when the underlying Session is expired. I put the following block of codes in my BasePage OnInit. As far as I tested,

  • Why does session cookie only show '.com' for the DOMAIN when viewed in IE8? 2009-03-27

    I am using the following code to set a session cookie HttpCookie cookie = new HttpCookie("visitId"); cookie.Value = value; cookie.Domain = ""; Response.Cookies.Set(cookie); This works fine, although I was surprised to see in IE8 when I hi

  • IE 8 only has access to session cookies? 2009-06-16

    Project I'm working on gets cookies from the browser to check for certain things. In FF, Safari, or Chrome, this works fine, but in IE 8 (don't have an earlier version of IE to test and MSFT won't let me uninstall IE 8 and have a working IE 7), the o

Copyright (C), All Rights Reserved.

processed in 0.086 (s). 11 q(s)