What I learned

I’ve been on a coding streak for the last day, which is why I haven’t written anything here. I discovered a few interesting things.

  1. The easiest way to open the default browser and go to a URL is with /usr/bin/open. Rather than using the Launch Services API or InternetConfig, simply do system("/usr/bin/open some_url"). It will do the right thing.
  2. Safari is a huge pain. I was able to get something working in every browser EXCEPT Safari. Safari’s very aggressive caching causes the wrong page to display, even when I add cache control headers. Safari also insists on sending POST requests for some javascript navigation buttons rather than GET requests which every other browser sends.
  3. MFC is ugly (I already knew this). Porting MFC code to the Mac is even uglier.

Comments are closed.