Category Archives: Tips and Tricks

A collection of insights I’ve found helpful in my web development process.

Use SquidMan.app to connect localhost to mobile devices

This step-by-step guide assumes you have MAC OSX installed and are troubleshooting from an iPad/iPhone. This should work in a similar fashion if your mobile device is Android based. Ensure your localhost’s URL is aliased such as, myproject.dev

  1. Download SquidMan.
  2. Run SquidMan.app.
  3. On iPad/iPhone open Settings > Wi-Fi and select your Wi-Fi network.
  4. Take note of the Wi-Fi network’s IP address. For example, 10.61.1.92.
  5. In SquidMan open your Preferences, Command + ,.
  6. In General ensure that HTTP Port is 8080.
  7. In Clients add IP address 10.61.1.92, then click save.
  8. In Template comment out http_access deny to_localhost and click save.
  9. Open System Preferences > Network on your Macbook and note its IP address. For example, 10.61.1.86.
  10. On iPad/iPhone open Settings > Wi-Fi and select your Wi-Fi network.
  11. Switch the HTTP PROXY by pasting your Macbook’s IP address, 10.61.1.86.
  12. On iPad/iPhone open your localhost URL.

Thanks to, egalo

JavaScript Window Location Options

/******************************************************************* 
* JavaScript Window Location Options
* URL: http://www.sample.com/sample.htm?query=accreditation
*******************************************************************/
window.location.search.substr(7); //'accreditation'
window.location.href.slice(window.location.href.indexOf('?') + 7).split('&'); //'accreditation'
(window.location.href.indexOf('query=') > -1); //true
(window.location.href.indexOf('jumpTo=') > -1); //false