Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- javascript



  How to play with cross domain request

What is cross domain request In simple, cross domain request is to request resource from other domain in one domain. Note, the "other domain" doesn't just mean domain name only, it includes much more. If the protocol, domain name, port is not the same, two domains will be considered different.  Below example describes what is considered as different domain. http://www.a.com/a.jshttp://www.a.com/b.js               # Same domainhttp://www.a.com/lab/a.js &nb...

   FRONT END,JSONP,CROSS DOMAIN,CROSS ORIGIN,CORS,DOCUMENT.DOMAIN,WINDOW.NAME     2016-11-06 00:48:54

  GET, POST, and safely surfacing more of the web

As the web evolves, Google’s crawling and indexing capabilities also need to progress. Weimproved our indexing of Flash, built a more robust infrastructure called Caffeine, and we even started crawling forms where it makes sense. Now, especially with the growing popularity of JavaScript and, with it, AJAX, we’re finding more web pages requiring POST requests -- either for the entire content of the page or because the pages are missing information and/or look completely br...

   HTML,Get,Post,Form,SEO,Index,Search engine     2011-11-02 12:48:47

  Advanced event registration models

On this page I explain the two advanced event registration models: W3C’s and Microsoft’s. Since neither is cross–browser supported, their use is, for the moment, deprecated. W3C and Microsoft have both developed their own event registration model to replace Netscape’s traditional model. Though I’m not impressed by the Microsoft model, W3C’s is very good, except for one crucial vagueness. Unfortunately few browsers support it at the moment. W3C W3Cââ‚...

   JavaScript,Event model,this,bubble,capturing     2011-12-27 09:20:44

  Getting the most out of your pixels - adapting to view state changes

In Windows 8, your apps run on a variety of screen sizes and under various view states. A user might have your app snapped to the side of a 25-inch desktop monitor, or fill the whole screen of a 10-inch widescreen tablet. In each case, you want your app to take full advantage of the available space. In this post, I show you how you can track the current size and view state of your app in code, and give you tips on how to write your app in the Windows 8 Consumer Preview to handle screen si...

   Windos 8,Metro,Resolution,Style     2012-04-23 06:13:02

  The trap of the performance sweet spot

This post is about JavaScript performance but I would like to start it by telling a story that might seem unrelated to JS. Please bear with me if you don’t like C.A story of a C programmer writing JavaScriptMr. C. is a C programmer as you can probably guess from his name. Today he was asked by his boss to write a very simple function: given an array of numbered 2d points calculate vector sum of all even numbered points... He opens his favorite text editor and quickly types somet...

   C,JavaScript,Sweet spot,Memory,Low level,Trap     2011-11-06 14:45:01

  Loading images progressively using Gaussian blur

The popular online publishing platform Medium has adopted an impressive image loading mechanism -- pure color - blur image loading - real image loading. Since images on Medium usually have high definition, it takes much time to load an image and hence brings a bad user experience if rendering the image after it's completely downloaded. The solution Medium comes out is to preload an small image when the real image is being loaded.  On Medium, the HTML code will have below pattern ...

   JAVASCRIPT,ALGORITHM,GAUSSIAN BLUR,MEDIUM,BLUR IMAGE     2016-09-25 03:33:00

  The Problem With Client-Side Analytics

Client-side analytics is broken. The numbers produced by it are trivially spoofable by competitors and nefarious characters. Most websites use client-side analytics of one type or another and the only way to get numbers you can trust is to compare numbers from multiple providers and to take an average of the closest two.This post highlights the problem and proposes a partial solution that substantially mitigates the issues with minimal effort. Our proposed solution is simply to include a digital...

   Client side,Analysis,Problem,Tricks,ASP.NET,spoof     2011-10-22 12:58:51

  What can .htaccess file do?

A .htaccess file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration. What can a .htaccess file do? We summarized some of them here.  Hope it may help you. 1. Timezone settingSometimes when you use date() or mktime() functions in PHP, , it may display some weird information because of the timezone difference. For example, one possible warning is :Warning: date(): It is not safe to rely on the syste...

   .htaccess,setting,tip     2012-06-15 06:39:39

  My secret Hobby: Applying for jobs

I have a probably unusual habit: I'm applying for jobs as programmer at least once a year. It 's not that I don't have a job, or that I don't like what I do, but since I am self employed and running my own company I have the feeling that I am coming out of touch of what the current job market is like, and so I started to apply for jobs at different companies once in a while. Just to keep in mind how this is like and for the fun of it.I think this is also a good training should I need to be emplo...

   IT,Career,Hobby,Job,How to     2011-08-26 02:41:47

  World leaders who know how to code

World leaders are those people who have extraordinary speaking skills and are a group of very busy people in most people's impression. But among them, there are a few who know how to program as well. Today we are going to summarize some of them. Lee Hsien Loong -- Singapore Prime Minister Lee Hsien Loong, Singapore Prime Minister posted a C++ program about Sudoku which he wrote several years ago. He shared the source code on Google Drive as well.  In 1971, Mr. Lee studied Mathema...

   World leader, Coding, Programming     2015-08-02 05:56:20