Author Archives: Mark Reyes

About Mark Reyes

Web Developer based out of Southern California.

Dos and Don’ts in JavaScript

Best Practices:

  • Choose short but readable variable names.
  • Avoid global variables.
  • Use only one global object to encapsulate any global variables you really need.
  • Always use var to declare your variables.
  • Indent your code so it’s readable.
  • Use curly braces to define blocks of code.
  • Comment your code.
  • Always use semi-colons.
  • Be aware of where automatic semi-colon insertion happens.
  • Declare variables outside loops.
  • Reduce DOM operations.

Simple PHP Proxy returns incorrect JSON from Apache Solr instance

I’ve implemented Ben Alman’s simple-proxy.php to communicate to an Apache Solr instance (in this case my local) outside of my domain.

I’ve followed the instructions in full, the core of which is to set the simple-proxy.php on my domain’s file server.

I’m curious on if there are any modifications that must be made to the proxy in order for the response to be in the correct format?

View on Stackoverflow.