Send HTTP request from PHP without waiting for response?

Unfortunately PHP by definition is blocking. While this holds true for the majority of functions and operations you will normally be handling, the current scenario is different. The process which I like to call HTTP-Ping, requires that you only touch a specific URI, forcing the specific server to boot-strap it’s internal logic. Some functions allow … Read more

Pagination: Server Side or Client Side?

The right answer depends on your priorities and the size of the data set to be paginated. Server side pagination is best for: Large data set Faster initial page load Accessibility for those not running javascript Client side pagination is best for: Small data set Faster subsequent page loads So if you’re paginating for primarily … Read more

Use in_app or latest_receipt_info for getting latest receipt for auto-renewable iOS 7 style transactions?

Just wanted to make clear that only the latest_receipt_info field is returning the latest renewed receipt. This is based on what we’re actually getting back from Apple. The relevant documentation is here on page 21. Although it states that latest_receipt and latest_receipt_info fields are “Only returned for iOS 6 style transaction receipts for auto-renewable subscriptions”, … Read more

Server-Sent Events vs Polling

Ajax polling adds a lot of HTTP overhead since it is constantly establishing and tearing down HTTP connections. As HTML5 Rocks puts it “Server-Sent Events on the other hand, have been designed from the ground up to be efficient.” Server-sent events open a single long-lived HTTP connection. The server then unidirectionally sends data when it … Read more

When to use “client-side routing” or “server-side routing”?

tl;dr: with server-side routing you download an entire new webpage whenever you click on a link, with client-side routing the webapp downloads, processes and displays new data for you. Imagine the user clicking on a simple link: <a href=”https://stackoverflow.com/hello”>Hello!</a> On a webapp that uses server side routing: The browser detects that the user has clicked … Read more

Meteor: Debug on server side

In Meteor 0.5.4 this has become a lot easier: First run the following commands from the terminal: npm install -g node-inspector node-inspector & export NODE_OPTIONS=’–debug-brk’ meteor And then open http://localhost:8080 in your browser to view the node-inspector console. Update Since Meteor 1.0 you can just type meteor debug which is essentially a shortcut for the … Read more

When and how do you use server side JavaScript? [closed]

It’s not AJAX, unless people are using the term improperly. As its name suggests, SSJS is JavaScript that runs on the server, interpreted by a standalone (i.e., browser-independent) JavaScript engine, like SpiderMonkey. Why bother? Well, one area I currently see it underutilized in is in data validation. With SSJS you write one piece of code … Read more