This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi, I'm developing an browser extension to help us AskScience Mods and have a few questions.
How often do session cookies / modhashes expire? Could I login once (or once an hour/day/week/month) and then continue to use the same modhash/cookie? Looking at the python source the session cookie doesn't appear to ever expire (the check of the cookie
datetime user sha(datetime user secret)
reads datetime user from the cookie and then compares to the secret). However, the modhash for CSRF protection seems to just be a placeholder in the reddit source.I plan on giving mods a few browser buttons that will combine a couple separate requests into a single action; e.g., mod presses a button that uses the API to 'post a (brief) comment', 'send a (brief) message', and 'change user's flair'. Should I wait 2 seconds between the three separate requests or can I send request 1, wait for response 1; then send request 2, wait for response 2; then send request 3, wait for response 3)? I expect these actions to happen rarely after testing finishes, less than 20 times a day (60 total requests daily) -- nowhere near the limit of 60 reqs/minute. So, I'd prefer not to have to wait 4 seconds to finish the combined requests, so they can get quicker feedback of success/failure. Is say 3 requests in say a second bad if the next request isn't for tens of minutes later? (This is also part of the reason I want to login once; so its not four requests).
Subreddit
Post Details
- Posted
- 12 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/redditdev/c...