Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
Yes.

JavaScript code:
//first create a function:
var someFunction = function (){
	console.log("hello from someFunction");
};
//Then either 
checkbox.onclick = someFunction;
//or (better)
checkbox.addEventListener('click', someFunction);

Wheany fucked around with this message at 08:55 on Nov 6, 2012

Adbot
ADBOT LOVES YOU

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Does setting a submit button to disabled cause its form to not submit? Here's what I have (sorry I don't have the code with me right now to show): A form that will be validated via JavaScript first and then by PHP. The form has an onsubmit event function to validate the fields. Inside the JS function I've disabled the submit button and re-enabled it only when a field is found invalid so that the user is able to click it again. If all fields are valid, I return from the function and the method="post" kicks in and the form is validated server-side via PHP. However, that last step never happens. When JS finds the fields valid and returns from the function, the form doesn't submit. That is, until I place "submitBtn.disabled = 'false'" right before returning from the function. Is this how it should be?

The reason I ask is because I just finished a JS book with an exercise that did this very thing (validate form in JS, disable button, re-enable if invalid, submit form once validated), but in the example the form was submitted WITHOUT having to first set submitBtn.disabled to false. The only difference is that the book's example did not do any server-side validation, it simply submitted the form.

Just wanting to make sure I understand what's going on.

DankTamagachi
Jan 20, 2005
Tamagachi to your throat!

caiman posted:

Does setting a submit button to disabled cause its form to not submit? Here's what I have (sorry I don't have the code with me right now to show): A form that will be validated via JavaScript first and then by PHP. The form has an onsubmit event function to validate the fields. Inside the JS function I've disabled the submit button and re-enabled it only when a field is found invalid so that the user is able to click it again. If all fields are valid, I return from the function and the method="post" kicks in and the form is validated server-side via PHP. However, that last step never happens. When JS finds the fields valid and returns from the function, the form doesn't submit. That is, until I place "submitBtn.disabled = 'false'" right before returning from the function. Is this how it should be?

The reason I ask is because I just finished a JS book with an exercise that did this very thing (validate form in JS, disable button, re-enable if invalid, submit form once validated), but in the example the form was submitted WITHOUT having to first set submitBtn.disabled to false. The only difference is that the book's example did not do any server-side validation, it simply submitted the form.

Just wanting to make sure I understand what's going on.

Can you post your JS validation code?

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

DankTamagachi posted:

Can you post your JS validation code?

Sure. Here's how it looks when it does not work:

code:
function isEmpty(value) {
    return (value === "");
}

function validateForm(event) {
    var theForm = document.regForm;
    var txtUsername = theForm.username;
    var txtPassword1 = theForm.password;
    var txtPassword2 = theForm.verpassword;
    var submitBtn = theForm.submit;
    
    submitBtn.disabled = true;
    
    // validate Username field
    if (!isEmpty(txtUsername.value)) {
            
                // validate password - pass 1
                if (!isEmpty(txtPassword1.value)) {
                    
                    // validate password - pass 2
                    if (txtPassword1.value === txtPassword2.value) {
                        
                        return;
                    } else {
                        alert("Passwords do not match.  Please reenter them.");
                        txtPassword1.focus();
                        txtPassword1.select();
                    }
                    
                } else {
                    alert("Password cannot be blank.");
                    txtPassword1.focus();
                    txtPassword1.select();
                }
        
    } else {
        alert ("Please enter your desired username.");
        txtUsername.focus();
    }
    
    submitBtn.disabled = false;
    eventUtility.preventDefault(event);
}
To get it to work, I add submitBtn.disabled = false; just before return;

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

An AJAX question.

What is the proper technique for validating a form via JS when one of the fields requires server-side validation? For instance, take a look at the code I posted in the post above this. Now imagine that the Username field must also be checked against the database to see if the name already exists. I want the "Sorry username already exists" alert to feel seamlessly a part of the other client-side validations.

Here's my general outline of this process. Please let me know if this is way off.

-Form's onsubmit event triggers a function called submitForm().
-submitForm() calls a function called ajaxUtility() and passes paremeters such as the url of the php file and the name of the function to process the response.
-ajaxUtility() does all the ajax stuff - creates the XHR object, checks its ready state and status, and sends the response from the server file to a function called processResponse() (the response being a simple text string indicating if the user name exists in the db or not).
-processResponse() looks at the responseText and, if it's "exists", shows the "screen name exists" alert. If it's "not exists", the validateForm() function is called and the rest of the form is validated.
-When the rest of the validation is finished, the form submits and the server-side validation kicks in.

Am I on the right track here?

Golbez
Oct 9, 2002

1 2 3!
If you want to take a shot at me get in line, line
1 2 3!
Baby, I've had all my shots and I'm fine

caiman posted:

An AJAX question.

What is the proper technique for validating a form via JS when one of the fields requires server-side validation? For instance, take a look at the code I posted in the post above this. Now imagine that the Username field must also be checked against the database to see if the name already exists. I want the "Sorry username already exists" alert to feel seamlessly a part of the other client-side validations.

Here's my general outline of this process. Please let me know if this is way off.

-Form's onsubmit event triggers a function called submitForm().
-submitForm() calls a function called ajaxUtility() and passes paremeters such as the url of the php file and the name of the function to process the response.
-ajaxUtility() does all the ajax stuff - creates the XHR object, checks its ready state and status, and sends the response from the server file to a function called processResponse() (the response being a simple text string indicating if the user name exists in the db or not).
-processResponse() looks at the responseText and, if it's "exists", shows the "screen name exists" alert. If it's "not exists", the validateForm() function is called and the rest of the form is validated.
-When the rest of the validation is finished, the form submits and the server-side validation kicks in.

Am I on the right track here?

I'm guessing you want this to be a smooth experience; you click the submit button, a little spinner comes up, and if there are problems with the submission then it displays them without having to reload the form.

My general feeling is, client-side validation should be done on change rather than submit. So as the field blurs, that is when it should check with the server to see if the username is taken, not on submit. Especially when that's the only field that you need to communicate with the server to validate. But that's just me.

Note that you still need to account for things that get past the Javascript (username acceptable when preliminary validation passed but not by the time the second one ran, etc). That could still be integrated into your smooth form.

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Golbez posted:

I'm guessing you want this to be a smooth experience; you click the submit button, a little spinner comes up, and if there are problems with the submission then it displays them without having to reload the form.

My general feeling is, client-side validation should be done on change rather than submit. So as the field blurs, that is when it should check with the server to see if the username is taken, not on submit. Especially when that's the only field that you need to communicate with the server to validate. But that's just me.

Note that you still need to account for things that get past the Javascript (username acceptable when preliminary validation passed but not by the time the second one ran, etc). That could still be integrated into your smooth form.

Yeah, I'll probably eventually opt to do the onBlur thing rather than onSubmit. But for now I'm just needing to know if my general logic is correct.

Begall
Jul 28, 2008
I've been trying my hand at web development recently, never done it before and my only programming experience has been with Python. I'm trying to create an order form where the total price is dynamically updated (using Javascript I guess?) when the quantity is incremented for a given item.

I'm using Flask to supply a template with the name/prices of the items from a database and the relevant part of the order form looks like this:

code:
              {% for entry in dcentries %} 
              <tr>
                <td name="DName-{{ loop.index }}" id="DName-{{ loop.index }}">{{ entry.name }}</td>
                <td name="DPrice-{{ loop.index }}" id="DPrice-{{ loop.index }}">{{ FormatCurrency( entry.price )|safe }}</td> 
                <td><input name="DQuantity-{{ entry.name }}" type="number" id="DQuantity-{{ entry.name }}" placeholder="0"></td>
              </tr>
              {% endfor %}  
Could anyone point me in the right direction for this? Not really sure how I can do it properly rather than hardcoding in each sum.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

caiman posted:

Yeah, I'll probably eventually opt to do the onBlur thing rather than onSubmit. But for now I'm just needing to know if my general logic is correct.

Looks fine to me.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Begall posted:

I've been trying my hand at web development recently, never done it before and my only programming experience has been with Python. I'm trying to create an order form where the total price is dynamically updated (using Javascript I guess?) when the quantity is incremented for a given item.

I'm using Flask to supply a template with the name/prices of the items from a database and the relevant part of the order form looks like this:

These are server-side templates, where is the dynamic updating happening?

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Begall posted:

code:
              {% for entry in dcentries %} 
              <tr>
                <td name="DName-{{ loop.index }}" id="DName-{{ loop.index }}">{{ entry.name }}</td>
                <td name="DPrice-{{ loop.index }}" id="DPrice-{{ loop.index }}">{{ FormatCurrency( entry.price )|safe }}</td> 
                <td><input name="DQuantity-{{ entry.name }}" type="number" id="DQuantity-{{ entry.name }}" placeholder="0"></td>
              </tr>
              {% endfor %}  
Could anyone point me in the right direction for this? Not really sure how I can do it properly rather than hardcoding in each sum.

Guessing from the code, since I have never programmed in whatever that is, and because I don't know what kind of values entry.name can contain, instead of <input id="DQuantity-{{ entry.name }}">, I'd use <input name="DQuantity-{{ entry.name }}" type="number" id="DQuantity-{{ loop.index }}" placeholder="0" class="quantity">.

For <td name="DPrice-{{ loop.index }}" id="DPrice-{{ loop.index }}">, I would also add data-price attribute, so <td name="DPrice-{{ loop.index }}" id="DPrice-{{ loop.index }}" data-price="{{ entry.price }}"> (again, guessing the syntax).

Then I would do this:
JavaScript code:
var quantities = document.querySelectorAll(".quantity");

//quantities is now a NodeList, which looks like an array and behaves mostly the same. Iterating over it is left as an exercise for the reader.

// declare changeListener outside your loop

var changeListener = function () {
	// calculate your new price here, "this" is the changed input.
	console.log(this.value);
};

// so, for all inputs in quantities:
// an_input assumed to be an input from quantities

an_input.addEventListener('change', changeListener);

Maybe this will help you get started?

Begall
Jul 28, 2008
Sorry for not being quite clear on the code, but that was of great help, thanks!

Here's what I've done, I think this is what you intended?

JavaScript code:
              var quantities = document.querySelectorAll(".quantity");
              // Used the same method to get the price list as the quantity list 
              var prices = document.querySelectorAll(".price");
              
              var changeListener = function () {
                var total = 0 
                for(var i=0; i<quantities.length; i++)
                  {
                    total += quantities[i].value*prices[i].getAttribute("data-price");
                  };
                document.getElementById('cost').innerHTML = total; 
             };
             
             document.addEventListener('change', changeListener);
Now to go away and work out how to make it ignore negative numbers. Or better yet, disallow them from being input, hmm...

smug forum asshole
Jan 15, 2005
while we're here can we talk about the problem of binding the same keydown or keypress event to two different behaviors here on the SA Forums?

(the hotkey for submit will also add strikethrough to whatever word the cursor is hovered over, or something like that. it is annoying!)

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Begall posted:

Sorry for not being quite clear on the code, but that was of great help, thanks!

Here's what I've done, I think this is what you intended?

JavaScript code:
              var quantities = document.querySelectorAll(".quantity");
              // Used the same method to get the price list as the quantity list 
              var prices = document.querySelectorAll(".price");
              
              var changeListener = function () {
                var total = 0 
                for(var i=0; i<quantities.length; i++)
                  {
                    total += quantities[i].value*prices[i].getAttribute("data-price");
                  };
                document.getElementById('cost').innerHTML = total; 
             };
             
             document.addEventListener('change', changeListener);
Now to go away and work out how to make it ignore negative numbers. Or better yet, disallow them from being input, hmm...

Well, almost. Actually I didn't even think of having to update the total cost of the shopping cart, but the reason I added the change listener to all inputs was to update just the row's price, with this.value * <the same row's price>. And the reason I wanted you to use data- attribute, is because they are special:
https://developer.mozilla.org/en-US/docs/DOM/element.dataset
No need to getAttribute("data-price"), just use dataset["price"]. Not that it matters a whole lot.

And updating the innerHTML is probably not a problem in this case, since you are uppading a number, but if the string you are inserting into an element is not supposed to be HTML, you should use .textContent (non-IE browsers) or .innerText (non-gecko browsers) (if element.textContent === undefined, use innerText)

Or, use jQuery and let them worry about those kinds of things.

Sergeant Rock
Apr 28, 2002

"... call the expert at kissing and stuff..."

Wheany posted:

Well, almost. Actually I didn't even think of having to update the total cost of the shopping cart, but the reason I added the change listener to all inputs was to update just the row's price, with this.value * <the same row's price>. And the reason I wanted you to use data- attribute, is because they are special:
https://developer.mozilla.org/en-US/docs/DOM/element.dataset
No need to getAttribute("data-price"), just use dataset["price"]. Not that it matters a whole lot.

And updating the innerHTML is probably not a problem in this case, since you are uppading a number, but if the string you are inserting into an element is not supposed to be HTML, you should use .textContent (non-IE browsers) or .innerText (non-gecko browsers) (if element.textContent === undefined, use innerText)

Or, use jQuery and let them worry about those kinds of things.

Just in case you don't know - the native dataset API isn't implemented in any version of IE, and you have to fall back to getAttribute... yes, even for IE10.

biochemist
Jun 2, 2005

Who says we don't have backbone?
Has anyone worked with Meteor.js? I went to my first front-end developers meetup last night and our project is going to be based around Meteor. I've never worked with node before, so it's a lot to catch up on but it look pretty cool.

Because it's new, I'm not getting the amount of results I'd usually get on Stack Overflow or sites like that, has anyone found a good resource?

Doc Hawkins
Jun 15, 2010

Dashing? But I'm not even moving!


That's because it is very new, has its own incompatible standards for everything, and only recently added exciting edge features like 'authentication' which make non-toy projects possible. I'd bet you won't find anything better than the official documentation for at least a year.

(I don't want to sound like an utter hater: it's pretty magical, I'm just sad that the team making it seems to want to build their own ecosystem up instead of letting developers leverage existing node/javascript stuff. )

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Sergeant Rock posted:

Just in case you don't know - the native dataset API isn't implemented in any version of IE, and you have to fall back to getAttribute... yes, even for IE10.

Well, at least getAttribute works across all browsers :(

Oh well, it's poo poo like this why you should use libraries.

Video Nasty
Jun 17, 2003

Doc Hawkins posted:

That's because it is very new, has its own incompatible standards for everything, and only recently added exciting edge features like 'authentication' which make non-toy projects possible. I'd bet you won't find anything better than the official documentation for at least a year.

(I don't want to sound like an utter hater: it's pretty magical, I'm just sad that the team making it seems to want to build their own ecosystem up instead of letting developers leverage existing node/javascript stuff. )

I just started on some Node development and there's pretty scarce resources for broadcasting and pub/sub outside of two or three websites that are geared towards the java end of development in Node.
It's amazing stuff, though. ZMQ and Meteor are the best frameworks I've seen out of it so far.

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.
I was reading through a bit of the underscore.js source code and I noticed that in a few places he used:
code:
results[results.length]=value
where results is an array. Is there any benefit/difference to using the above as opposed to
code:
results.push(value)
?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
No. results.push(value); is defined to be the same as results[results.length]=value;

OddObserver
Apr 3, 2009
Well, one benefit is that it works even when someone messed up Array.prototype.push. (Also if it doesn't exist, which was the case for some prehistoric IE, not sure of which versions, though).

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
But it wouldn't work if somebody hosed up Number.prototype.toString!

(seriously, playing this whole game is dumb)

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

I have some JavaScript that uses setInterval to increment the alpha value of the background-color of an element:

code:
var timer = setInterval (function(){
	if (val <= 1 && val >= 0) {
		val = val + .1;
		el.style.backgroundColor = 'rgba(123, 123, 123,' + val + ')';
	} else {
		clearInterval(timer);
	}
}, 8);
When I debug this in Chrome, the backgroundColor value isn't matching the value of val. For instance, after one iteration, the value of val is equal to 0.1, but the value of el.style.backgroundColor is equal to "rgba(123, 123, 123, 0.0980392)". Why?

Spatulater bro! fucked around with this message at 00:25 on Nov 18, 2012

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.

caiman posted:

I have some JavaScript that uses setInterval to increment the alpha value of the background-color of an element:

code:
var timer = setInterval (function(){
	if (val <= 1 && val >= 0) {
		val = val + .1;
		el.style.backgroundColor = 'rgba(123, 123, 123,' + val + ')';
	} else {
		clearInterval(timer);
	}
}, 8);
When I debug this in Chrome, the backgroundColor value isn't matching the value of val. For instance, after one iteration, the value of val is equal to 0.1, but the value of el.style.backgroundColor is equal to "rgba(123, 123, 123, 0.0980392)". Why?

This doesn't directly answer your question, but this code seems to work:
http://jsbin.com/ojecop/1/edit

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

Bodhi Tea posted:

This doesn't directly answer your question, but this code seems to work:
http://jsbin.com/ojecop/1/edit

Yeah, that's pretty close to how I got it to work. But the problem I ran into was when I wanted to also do a fade OUT effect on mouseout. Since the actual rgba value was giving all sorts of extra decimal places, it was difficult to get it to work. I've figured it out, but I'd really like to understand why the code doesn't put the clean rounded value (i.e. "0.1") into the backgroundColor value.

Bodhi Tea
Oct 2, 2006

seconds are secular, moments are mine, self is illusion, music's divine.

caiman posted:

Yeah, that's pretty close to how I got it to work. But the problem I ran into was when I wanted to also do a fade OUT effect on mouseout. Since the actual rgba value was giving all sorts of extra decimal places, it was difficult to get it to work. I've figured it out, but I'd really like to understand why the code doesn't put the clean rounded value (i.e. "0.1") into the backgroundColor value.

I believe it is due to the way floating point numbers are handled:
http://stackoverflow.com/questions/1458633/elegant-workaround-for-javascript-floating-point-number-problem

Spatulater bro!
Aug 19, 2003

Punch! Punch! Punch!

^^^Didn't see your reply. If that's the case, shouldn't val also be set to to "0.0980392"? Or maybe I'm not understanding something.

For clarification, these screenshots are taken at the same point in the same iteration:



And:

Spatulater bro! fucked around with this message at 01:28 on Nov 18, 2012

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
It could be that ecmascript standard defines variables with more bits than the css' standard does for the rgba function.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
The Number type in Javascript is your standard IEEE 754 double. For CSS, I don't think there's a required precision (or even a minimum) specified anywhere.

As an aside, if you don't care about old versions of IE you can (and should!) use CSS transforms instead of doing it manually in javascript.

My Rhythmic Crotch
Jan 13, 2011

I have no idea if anyone will find this useful, but here are some shortcomings I've run into with Kendo grid over the past few weeks.

- Cannot dynamically change the grid in and out of editable mode. Reloading just the div the grid is contained in doesn't seem to work either, I'm having to do a full page reload to get around this.
- Cannot disable animation of modal pop-up used for editing grid contents
- Cannot have icon only "edit/new/delete" buttons in grid. Well, you can put no text, but the padding is messed up and the buttons look retarded.
- Row and/or cell selections are lost when columns are sorted.
- JSON datasource must be perfectly flat, no nesting is supported
- Delete confirmation pop-up is not styled by default

These of course can all be gotten around (well, kinda). It's just annoying.

putin is a cunt
Apr 5, 2007

BOY DO I SURE ENJOY TRASH. THERE'S NOTHING MORE I LOVE THAN TO SIT DOWN IN FRONT OF THE BIG SCREEN AND EAT A BIIIIG STEAMY BOWL OF SHIT. WARNER BROS CAN COME OVER TO MY HOUSE AND ASSFUCK MY MOM WHILE I WATCH AND I WOULD CERTIFY IT FRESH, NO QUESTION

Bodhi Tea posted:

I was reading through a bit of the underscore.js source code and I noticed that in a few places he used:
code:
results[results.length]=value
where results is an array. Is there any benefit/difference to using the above as opposed to
code:
results.push(value)
?

They do that to protect data, it's a cross-site scripting thing. Basically someone could override the results.push() method to their own nefarious ends, but you can't exploit results[results.length]

putin is a cunt fucked around with this message at 02:06 on Nov 20, 2012

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Gnack posted:

They do that to protect data, it's a cross-site scripting thing. Basically someone could override the results.push() method to their own nefarious ends, but you can't exploit results[results.length]

What attack are you actually protecting against here?

If an attacker is running javascript on your page, you've already lost the XSS game and not letting them override Array.push isn't going to save you. If you're embedding user data in your javascript and letting someone else execute it, you're also playing with fire and you're better off doing that in a more secure way instead of trying to protect yourself with some cute tricks.

And if neither of those are true, you shouldn't really care if someone messes with it because it doesn't expose any new security vulnerabilities.

Strong Sauce
Jul 2, 2003

You know I am not really your father.





https://github.com/documentcloud/underscore/commit/19acc63374299828e25d5e55d5004f562fc6b20f

According to the commit, it was changed for "speed". Bit dubious about this since from what I've read from speed tests push has been rated faster than array[len] = val.

Funking Giblet
Jun 28, 2004

Jiglightful!
http://jsperf.com/push-vs-index2

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Jabor posted:

What attack are you actually protecting against here?

If an attacker is running javascript on your page, you've already lost the XSS game and not letting them override Array.push isn't going to save you. If you're embedding user data in your javascript and letting someone else execute it, you're also playing with fire and you're better off doing that in a more secure way instead of trying to protect yourself with some cute tricks.

And if neither of those are true, you shouldn't really care if someone messes with it because it doesn't expose any new security vulnerabilities.

I'm building an offline and sync web application so this sort of interests me, I've been thinking a bit about how security works what with alot of your code readily accessible. It's just an offline prototype at the moment, but I'm planning on syncing through JSON and a standard authenticated login session. Is there anything particularly naive about this? Are there any recommended resources available for security best practices in javascript applications?

Boz0r
Sep 7, 2006
The Rocketship in action.
I'm trying to do a drag'n'drop functionality on a website, but JavaScript is messing with me.

code:
function drag(event) {
	event.dataTransfer.setData("Text", event.target.id);
	alert(event.dataTransfer.getData("Text", event.target.id));
}
event.target.id is "div3", but the getData just returns "". What gives?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

... which shows that push is faster on everything except one version of Chrome?

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Maluco Marinero posted:

I'm building an offline and sync web application so this sort of interests me, I've been thinking a bit about how security works what with alot of your code readily accessible. It's just an offline prototype at the moment, but I'm planning on syncing through JSON and a standard authenticated login session. Is there anything particularly naive about this? Are there any recommended resources available for security best practices in javascript applications?

Can you elaborate a little bit more on the web app you're working on? I've been thinking about developing a similar system and I'm curious if you could discuss issues you've run into with with offline data.

Adbot
ADBOT LOVES YOU

Funking Giblet
Jun 28, 2004

Jiglightful!

Suspicious Dish posted:

... which shows that push is faster on everything except one version of Chrome?

I didn't make a comment either way.

IE10 smokes everything :P

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply