Coder Social home page Coder Social logo

jquery-session-plugin's Introduction

#JQuery Session Plugin Provides a simple interface into window.sessionStorage while providing limited support for cross protocol requests.

##Usage

$.session.set('some key', 'a value');

$.session.get('some key');
> "a value"

$.session.clear();

$.session.get('some key');
> undefined

$.session.set('some key', 'a value').get('some key');
> "a value"

$.session.remove('some key');

$.session.get('some key');
> undefined

jquery-session-plugin's People

Contributors

alexchittock avatar perece avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-session-plugin's Issues

Does not accept boolean values

if ($.session.get("leftbarCollapsed") == "true") // works
if ($.session.get("leftbarCollapsed") == true) // doesn't work
if ($.session.get("leftbarCollapsed")) // neither does this

Session in PHP

this plugin is working fine but when i wants to get the session value in php using $_SESSION[] its not available...

I thing there is only one season exists at once and if this plugin is able to set that session then no matter what it should be accessible by another programming language also...

When I am trying to print print_r( $_SESSION ) in php which is to show all session variables and there values its showing an empty Array()

I am confused if the way this plugin is working is there any real session exists or its just saving some values while moving from page to page.

At the end is there any way to access $.session in PHP?

cookies[i].split is not a function

Hi

After adding the script to my project i have the following error visible in the firebug console:
TypeError: cookies[i].split is not a function

thrown by "var kv = cookies[i].split('=');" inside "_initCache: function()"

Situation as is: there are no cookies from that domain.
May it be that there is an error handling missing, if cookies is not filled correctly?

Not working in IE7

IE7 throws an error called window.sessionStorage in NULL or not an object when we are trying to fetch the stored data

ie error

error:

'SCRIPT5007: Unable to get value of the property 'getItem': object is null or undefined
jquery.session.js, line 85 character 13'

i have implemented with jquery draggable. but, it makes error and stop other js from working also.

Not working in next page

Hi,

Please help me regarding this if i created a session using this plugin i can access this session in next tab.
Its working in only one tab.
So please help me regarding this ASAP.

Thank You
Akhil
[email protected]

doesn't working

Trying getting any session value returns undefined

$.session.get('user_id')

I've check session on backend, value is present.

[object Object] error

This session jquery is working fine for me. But the problem i faced when i try to get the paying amount, i get output as "[object Object] instead of amount, i.e "100, 70" etc.
here is my code for paying amount session:

<script> var amount_to_pay = $('#amount_to_pay').html(final_price); $.session.set('amount_to_pay', str_amount_to_pay); var session_amount_to_pay = $.session.get('amount_to_pay'); console.log(session_amount_to_pay+" is the amount for "+id); </script>

HTTP error code 431 after long time of usage

The random _id in the name creates 100+ different cookies over time and sooner or later leads to HTTP error code 431 Request Header Fields Too Large and site stops responding...

I changed this:

if (!window.name) {
     window.name = Math.random();
}

to this:

if (!window.name) {
     window.name = 'fixedName';
}

which fixes it.

Is there a specific reason you are using the random name?

Regards,
Alex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.