I don't need your stinking AJAX magic
-
I was looking at this: http://publish.samsungsimulator.com/simulator/27b08413-676c-405a-a866-20c36d30c427/
Seems quite useful, but you know how we all are around here, with our "Show source code" button:
Yep, all the JSON data for this particular tutorial is there. Not too big of a WTF but I don't know, you're already using jQuery, why don't do an ajax call?
-
-
Male to female, y'know, like the birds and the bees...
-
I've done similar things. The only reason AJAX would make sense here, is if the data were both big and used on other pages. This would allow caching. I don't see how this one line... it's 200k of data.
-
I don't use it.
My TV does.
-
Found this at the bottom of the "data object":
jQuery(document.body).ready(function() { var printURL = 'http://publish.samsungsimulator.com/simulator/27b08413-676c-405a-a866-20c36d30c427/print.html'; window.ssAgentMode = ''; ssloader(simulatorData, printURL, 0); });
If you go to that URL, it is essentialy (at a visual level)l a blank page. Not sure what the above function actually does, but I'm guessing that if the end user wants to print the page. The heavy lifting is done by the Client, not the Server.
I have used similar techniques, especial with pages fetched from the Server by "AJAX" requests, to use the processing power of the Client to do similar, back in the day before the plethora of JS frameworks. I.e. Rather than tabulate a whole load of data Server Side, I would send all the tools needed for the client to do it, and then just feed it pure data as it wants.
-
?
Why would you use an AJAX call? I mean, you know the page is gonna need the data sooner or later, why not just serve it up?
Oh wait, Samsung-- I guess we're supposed to hate everything they do now.
-
Oh wait, Samsung-- I guess we're supposed to hate everything they do now.
Only their website design. And customer service. And build quality of most of their products.