Showing posts with label Web Development. Show all posts
Showing posts with label Web Development. Show all posts

Monday, January 26, 2015

The Great FireWall of China and Web Development

The new leader of China, Xi Jinping, had strengthened the Internet Censorship in China. Beginning this new year, all Google services became inaccessible from mainland. 

The impact is severe, for that it does not only affect the well-known Google Services - Gmail, Google Drive, Google Play, etc - but also developer-oriented services, such as Google App Engine. Furthermore, since many scripts and fonts are hosted on Google CDNs, the total banning of Google services has rendered tons of websites not related to Google ugly or non-functional. Many modern websites rely on Javascript to function correctly, not to mention web apps.

Before going back to China I was wondering if it would be necessary to develop websites that still works without Javascript. As far as I know, that's a compatibility requirement even rarer than "This has to work on IE6". During this winter in China I have experienced what it's like to use the Web this way, and it's not pretty. Sometimes I have to use view-source to extract the information I want. The modern web has already became heavily javascript-dependent, and from how it looks in the industry, there is no going back.

Maybe a wise thing to do is to keep in mind that there would be users accessing your website without the Javascript functioning. My experience in China is a pretty unique situation, but there are many other situations that might break your javascript on the user's computer. A broken website that still has the information the user is looking for with some ugly default fonts and misplaced CSS is better than nothing at all.

P.S. This post is not an excuse for my low productivity this winter.
P.P.S. Since so many important services became inaccessible, especially Gmail, I took the opportunity and installed Firewall-breaching softwares on my family members' computers. Another major victory for Chinese Democracy.

Tuesday, April 22, 2014

="/......" vs ="......"

That title is totally not emoticon.


In web development, if a relative URL starts with a slash:

href="/css/bootstrap.css"

It would point back to the root directory of current site, then go down the url, turning into "http://changbai.li/css/bootstrap.css"


But if it doesn't lead with a slash:

href="css/bootstrap.css"

It would start going down the url from the local directory. Say that code is inside changbai.li/work/ninja/index.html, then it'll point to "http://changbai.li/work/ninja/css/bootstrap.css"

I can't exaggerate how useful this is. Or how fun it'll be to mess with developers using this*.


*Don't do that.