Single Page Application: advantages and disadvantages [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago. Improve this question I’ve read about SPA and it advantages. I find most of them unconvincing. There are 3 … Read more

Catch all JavaScript errors and send them to server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Closed 10 months ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I wondered if anyone had experience in handling JavaScript errors globally … Read more

Pass request headers in a jQuery AJAX GET call

I am trying to pass request headers in an AJAX GET using jQuery. In the following block, “data” automatically passes the values in the querystring. Is there a way to pass that data in the request header instead ? $.ajax({ url: “http://localhost/PlatformPortal/Buyers/Account/SignIn”, data: { signature: authHeader }, type: “GET”, success: function() { alert(‘Success!’ + authHeader); … Read more

What is the difference between client-side and server-side programming?

I have this code: <script type=”text/javascript”> var foo = ‘bar’; <?php file_put_contents(‘foo.txt’, ‘ + foo + ‘); ?> var baz = <?php echo 42; ?>; alert(baz); </script> Why does this not write “bar” into my text file, but alerts “42”? NB: Earlier revisions of this question were explicitly about PHP on the server and JavaScript … Read more

How to export JavaScript array info to csv (on client side)?

I know there are lot of questions of this nature but I need to do this using JavaScript. I am using Dojo 1.8 and have all the attribute info in array, which looks like this: [[“name1”, “city_name1”, …][“name2”, “city_name2”, …]] Any idea how I can export this to CSV on the client side? 29 s … Read more

How to create a file in memory for user to download, but not through server?

Is there any way I can create a text file on the client side and prompt the user to download it, without any interaction with the server? I know I can’t write directly to their machine (security and all), but can I create and prompt them to save it? 22 s 22 Simple solution for … Read more