Monday, January 16, 2012

Future of Social Network will go offline on this Wednesday (1/18/2012)

After reading more about SOPA and what it will mean to overall internet, I've decided to join the protest by redirecting Future of Social Network site to Stop SOPA site.  If you have not heard about SOPA yet, you can read more about it on my blog entry from yesterday.

If you run a website or blog but unsure as to how to join the protest, I want to share 3 options from which you can choose from.  I've found a couple of SOPA protest sites: and  I'm sure there are many more.  You can choose any of the below methods to redirect.
#1 Use 302 redirect (temporary redirect) to SOPA protest site of your choice.  Often this option will not be available to Blogger user like myself.  The closest thing is to use <meta> tag with http-equiv='refresh' as shown below:

<meta content='3;url=' http-equiv='refresh'/>

But caveat with this approach is that it will throw off Google bots thinking that your site is permanently redirecting (301 redirect) to the SOPA protest site.  If you care about your Google ranking, using <meta http-equiv='refresh'> is not a good option.

#2 Use CloudFlare App to black out words on your page and put 'censored' corner badge on your site.  I have not tried the app myself, but it seems to be the easiest way to participate in protest if you are not sure about editing HTML template.  Link is available here:

#3 This is the option that I ended up choosing.  Shout out to Sara J Chipps for sharing the code on AVC.  Idea is to use javascript to redirect based on date.  If you are using Blogger like me on new admin UI, you can open 'Template' menu on left hand side, and click 'Edit HTML' button.  Click 'Proceed' button, and look for '<header>' tag.  Right after the '<header>' tag, insert the following:

var today = new Date(); 
if (today.getDate() == 18) {
 if (today.getMonth() == 0) { 
  if (today.getFullYear() == 2012) {
window.location = ""; 

What it does is that it detects if the current server time (which seems to be Pacific timezone for Blogger server) and redirects the page to SOPA protest site.  Of course, if you find other SOPA protest site that you want to redirect to, you will need to replace 'window.location = "..."' with the one you want.

For some reason, I couldn't collapse three if statements into one when editing Blogger template (it gave me an error saying "Error parsing XML, line 8, column 30: The entity name must immediately follow the '&' in the entity reference.", and I didn't bother troubleshooting it further).  So just copy and paste will be an easy option.

There you have them.  If you haven't done anything to voice your concern regarding SOPA, please do by following this link now:

No comments:

Post a Comment