I have been working on front end framework call "BackboneJs", I have used the cookie to store data in browser.
But in some case i need to store more data which does not supported by cookie.
Is anyone know the best option for storing considerable large data which cookie does not support.
Please suggest your ideas.
And yes it must be cross browser supported
You can refer to http://lucb1e.com/rp/cookielesscookies/ ,
This tracking method works without needing to use:
Cookies
Javascript
LocalStorage/SessionStorage/GlobalStorage
Flash, Java or other plugins
Your IP address or user agent string
Use HTML5 local storage.
Reference : http://www.w3schools.com/html/html5_webstorage.asp
You can use cross-browser compatible library jStorage for this.
jStorage is a cross-browser key-value store database to store data
locally in the browser - jStorage supports all major browsers, both in
desktop (yes - even Internet Explorer 6) and in mobile.
Additionally jStorage is library agnostic, it works well with any
other JavaScript library on the same webpage, be it jQuery, Prototype,
MooTools or something else. Though you still need to have either a
third party library (Prototype, MooTools) or JSON2 on the page to
support older IE versions.
Related
I'd like to have a backend for my chrome/firefox extension app which makes queries to a local (preferably nosql) database. Is there any way to do this? Perhaps a query language for accessing chrome.storage?
read about html5 storage in particular indexedDb and web sql. those are the only possible ways to query storage (ok well the html5 filesystem api is also a way that could be considered indexed by using folders).
All three work well in chrome. Make sure to use them from the correct location (background script). Havent tried with other browsers, check their html5 compatibility.
Even if you use something specific of Chrome, both Firefox and Edge recently promissed supporting chrome extensions by just repackaging them for their store.
Our clients use RDP sessions created by clicking a button on our site which uses the old MSRDP.cab file called in a webpage. We also utilize Virtual channels using a custom dll. Both our dll and the MSRDP.ocx are loaded through the object tag and cab files using VBScript.
As you might know, the orginal RDP connection script was written in VBScript. Apparently the ActiveX control will only work if called using VBScript. That has been working for over a decade. However the newer IE browsers and virtually all of the other browsers do not support VBScript.
I realize that I can call the new RDP program mstsc.exe from Javascript for a straight connection. However, we also pass information to the old ocx like the plugin parameters in Advancedsettings which include our dll that uses virtual channels. In addition, we pass the domain and username.
Maybe I'm searching in all the wrong places but I'm turning up no answers in trying to find how to run this ocx in javascript or another solution that would work. I'm thinking there has to be a replacement out there that I'm overlooking.
We are able to force our clients to use IE so we are currently having our clients with IE versions over 10 to use compatibility mode. However I'm sure at some point this may no longer work.
Has anyone out there had a similar problem that you have found a solution for? Any ideas or suggestions would be appreciated. Thanks!
You mentioned it yourself that in the future, your ActiveX may no longer work and supported so I strongly believe that you should invest your time in re-writing your app using a more modern approach instead.
Here's a link to a solution where it is using Jquery and ASP.NET to open an RDP connection:
Open RDP Connection window using jquery - client side
One of the requirements of one of my clients is to show a message to a user that's using an older version of Firefox, Chrome, IE or Safari. For the last two it's easy (IE 9+ and Safari 5+). But for Firefox and Chrome, the requirement is that the site supports the current and the previous version of each browser.
To get the clients browser and version is quite simple, but I need to know what is the last version of each browser. Is there any way of doing that?
Well, technically, all you need is a place that keeps track of what the latest version of each browser (Ideally with a web service).
A quick Googling I was able to find: http://www.webdevelopersnotes.com/articles/latest-browser-versions.php
It's not a web service, but you could simply parse that HTML and get the latest version of each browser. Alternatively, you could keep track yourself and manually update this information in your database.
You should only ever have to worry about IE when it comes to version enforcement. Exception being, of course, if you need a specific API that's just not available in previous versions of Chrome/Firefox, but in that case you'd look and enforce the API, not the browser version. Adding to that, if Chrome/Firefox don't have an API, chances are even the most bleeding edge version of IE won't either, so the point is moot. The fact is Firefox and Chrome, and in part Safari, are far ahead of IE when it comes to browser hosted capabilities that trying to enforce specific versions of the former would likely be a lot of wasted time and effort to yield nothing substantial.
The best I could find was this. It has an export option that allows to export in JSON, XML...
I would strongly suggest that you don't check the browser version, instead try doing feature detection using, say, Modernizr.
What features of your client's site depends on specific versions of each browser? If you use Modernizr you could perform a check on a feature, say some video stuff, and if the current browser does not support that feature, then display a message to the user suggesting they upgrade their browser.
Detecting browser versions via Javascript is very flakey at best.
The only reason I'd say you need this kind of verification is because your webpage has features only available to latest browsers. Instead of relying on version numbers, I suggest learning Modernizr.js for your website.
http://modernizr.com/
It can detect particular html5/css3 features individually.
I am creating an app using HTML5 and Javascript. This app will be compatible with Windows and iOS 6 (iPad). I need a local database access using javascript. This is a pure offline ap with no server side involved.
My dilemma is -
WebSQL is not supported anymore by W3C.
IndexedDB works with Firefox but not with iOS6.
Most importantly, I want to avoid HTML5 Local database storage as it cleans data whenever history is cleared.
I would like to have a durable database locally for the app, something like SQLite. Is it possible to access SQLite using pure javascript, so that it will work with Firefox on Windows and also on iPad.
EDIT: The app will not be run from the browser in iPad (iOS6). Rather the app will be packaged into ipa file and installed in the iPad device.
What you're looking for is a polyfill.
According to HTML5 Please, IndexedDB Polyfill implements the IndexedDB APIs over WebSQL. (The author of the polyfill also wrote an article on Mozilla Hacks about it.)
Facebook also as a polyfill. According to this pull request (to another project), Parashuram Narasimhan, the author of the first polyfill, seems to prefer the Facebook polyfill and is considering retiring his own project. (But then again, the Facebook repo looks like a one-time code dump and may not have any ongoing development.)
There are some points to note.
Its a pure client side app.
Not using webstorage (local and session)
The options left are using webSQL, IndexedDB, Third-party framework or custom solutions.
webSQL :- Support is limited to webkit browsers and w3c declared its dead. Browser support
IndexedDB :- Supports in IE10, chrome and Firefox. Browser support. Not supported in older versions of IE.
Third-party framework :- sequelsphere is a platform independent solution to address this issue. It is a RDMS written entirly in javascript and make use of webSQL or IndexedDB.
custom solutions :- Supporting both IndexedDB and WebSQL on a cross platform web app like this tutorial, we can create our custom cross-browser db solutions or may use lawnchair like json storage options.
We had same issue and got answered on this thread.
Lawnchair is a good choice if you need a single table DB - we had requirement of multiple tables, so have developed own wrapper.
Create a web app using HTML-5 and JavaScript, so that it can work for both desktop browser and
iPad. Make it hybrid using PhoneGap for making it iPad's native app.
Please check whether this might be helpful. you can use javascript for both front-end and back-end (for db interactions). There are so many plugins also available to use for this framwork. http://www.nodejs.org
It's 100% possible. I can recommend a javascript lib for data access in html5 sqlite.
Documentation & sample code: click here
I have made a android demo (by using phonegap) with that lib. It works great!
Download the demo here
I'm developing a project in Server Side Javascript (SJS) using POW webserver. The result of the project will be a local application for users that will interact with a sort of "Database" of Answers and Questions (It's like a Quiz Builder).
Actually we are just starting and we are storing informations into JSON files (POW allows read/write of plain files), but I'm looking for a more efficient way to store and recall information from the DB (something SLQ-like).
Is there any possibility of doing this using Javascript? One of the requirements is that the user doesn't have to install a DB server (Mysql, Sqlite ecc) so it should be a Javascript-pure way, or even XML-HTML5 way (I'm not going to use WebDB or similars).
There are two client-side database features in modern browsers: IndexedDB and Web SQL.
Neither is fully supported across the current versions of the various browsers, but IndexedDB seems to be the one which is going to win -- the Web SQL is apparently no longer being maintained, and may be dropped entirely.
You can find out more about them both, and their respective browser support on the CanIUse website.
[EDIT] As mentioned by #Raynos, there is also LocalStorage, which actually appears to have much better cross-browser support than either of the other two mentioned above. Given the browser support (even IE8 supports it!), this would seem to be the best option for the time being, even though it isn't as fully featured as the other options above.
Here's the CanIUse details for LocalStorage.
Hope that helps.
POW provides simple access to SQLite DB, saved in pow/data folder.
http://davidkellogg.com/wiki/Pow_db