This article is the archive from my friend’s website which is not running any more. As some of my article is referring this information, I have to move the content here, as the original link is dead.
Read more
Access-Control-Allow-Origin for Multiple Origin Domains
For security reason, browser doesn’t allow website to load javascript from other domains by default. It is known as javascript cross domain problem. I remembered that I wrote another post to talk about this when I was working on a iOS project, Ajax HTTPs Reuqest in iOS UIWebview. In that article, I have given 4 solutions for that. Today, I will talk about another issue basing on one of the solution, the Access-Control-Allow-Origin. Before we talk in deep, first let me describe my problem first.
Read more
Unicode in Python
Unicode is not a new topic in my blog. Last time, when I was writing PHP script on Windows, I met the problem about read file content with unicode file name. In that case, I have to get the file by give file name which is encoded by UTF-8, while all Chinese characters are encoded by CP936/GBK in Windows (I am using windows 7). I will not repeat that again. You can find the solution by reading that post. Today, I am going to talk about Unicode in python. Python is a great language to write crawlers. When getting the website content, we will save the content and parse it for later usage. Here is a piece of example source code to get content from URL.
Read more
Schedule Jobs on Mac with Crontab
I have thought about to write this article for a long time. At the beginning, I wanna append this tips on post “Work on Mac“. Finally I decide to write this article because this topic covers quite lots of content, a separate article will be better. As we know, on Unix or Linux, we can use cron to schedule tasks. But on Max OS, it’s better to use crontab utility.
Read more
Enable SSL on Your WordPress Website
There are several benefits when we enable SSL on our WordPress website. The main benefit is make your website and your visitors more secure. Meanwhile, it will also benefit your site SEO result. But how big the impact is, no one knows. Anyway, enabling SSL is better than nothing. If you are using WordPress to setup your website and it will be easy to use SSL. If you already have a website and you decide to switch your website from HTTP to HTTPS, there will be some extra jobs to do. Normally, you have to accomplish following task to switch your website from HTTP to HTTPS.
- Apply HTTPS certificate
- Enable HTTPS in your share hosting
- Setup WordPress Address (URL) and Site Address (URL)
- Redirect all HTTP traffic to HTTPS
- Update all link in Database