I’ve done some more work with Polymer 1.0, so I have some more to share with what I have learned. Specifically, what I was working on was making my home page mobile friendly and also working on a quick program with my son to track license plate states on our road trip.
At the Google I/O conference, they announced the release of Polymer 1.0. I’ve been wanting to get into Polymer for a while now, and that was the one nudge that I needed. I decided to take a stab at redesigning my website’s home page with Polymer.
Here’s what I have learned…
I have been working on getting data transfer encrypted for parts of my website, and I think I have a solution! Rather than encrypt all of the site with an expensive SSL certificate, I am just going to encrypt the AJAX calls.
Here are the resources that I am using:
Do you have any experience with this or anything similar? Comments are welcome!
Update: I am still trying to get it working… Check out my question here.
Update: Here’s a nice link to help with generating the key: madboa.com: OpenSSL Command-Line HOWTO — How do I generate an RSA key?
Update: I haven’t been able to get pidCrypt to work. I found another tool that looks very good called jCryption, but I can’t make it work because my host doesn’t provide the bcMath library. I found a couple more helpful pages here and here.
I have been working with Google’s Webmaster Tools, and one of the things that it requires is a sitemap. It took me some tweaking to get it right, but here is what I learned.
First, I had to hand craft a sitemap php file for the main, parent site. The first thing that I struggled with was how to get the content type and XML heading in a php file. The solution was the header() command and to use the echo command.
Here is the heading of my sitemap page:
echo ‘<‘ . ‘?’ . ‘xml version="1.0" encoding="UTF-8" ‘ . ‘?’ . ‘>’
The next hurdle was to determine how to include the last modified field. I found the filemtime() command could read the last time the file was changed. Then, the date() command using the DATE_W3C format puts it in the correct format that the sitemap expects.
Here is what an entry looks like.
<lastmod><? echo date (DATE_W3C, filemtime(‘index.html’)) ?></lastmod>
I didn’t need to mess with any of the settings. I should have blogged this as I was doing it, but if I remember right, I had to visit this page the first time to generate the sitemap. From there, it takes over.