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

SEARCH KEYWORD -- CROSS ORIGIN



  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

  A mini guide to HTTP referer

In HTTP header, there is a field named Referer which is to provide the referrer of the current accessed page. In this post, we will introduce the usage of HTTP referer field. On the web, when a user visits a webpage, s/he must be from some place. This place is usually referred a s referer. This information is very important to some website operators and server owners as they want to know where they get the traffic from and this helps them provide better service for potential targeted users. In t...

   HTML,HTTP REFERER,REFERRERPOLICY     2019-06-29 02:23:25

  A simple tutorial about CSS flex property

CSS Flexbox is a layout module that makes it easier to create flexible and responsive layouts in CSS. It provides a simple and powerful way to align elements within a container and distribute space between them. To use flexbox, you need to set the display property of an element to "flex". You can do this by adding the following rule to your CSS: .container { display: flex; } The flex container will now have two main axes: the main axis and the cross axis. By default, the main axis runs horizo...

   JUSTIFY-CONTENT,FLEX,CSS     2022-12-25 06:44:34

  Gcd Algorithm with JavaScript

How to find the greatest common divisor between two integers? We may encounter this problem frequently in interviews or other occasions. An efficient metho to find gcd is the Euclidean algorithm, which uses the division algorithm in combination with the observation that the gcd of two numbers also divides their difference: divide 48 by 18 to get a quotient of 2 and a remainder of 12. Then divide 18 by 12 to get a quotient of 1 and a remainder of 6. Then divide 12 by 6 to get...

   JavaScript,Algorithm,Gcd,Implementation,     2011-09-21 15:57:32

  Frequently used Git commands

Git configuration git config --global user.name "robbin" git config --global user.email "fankai@gmail.com" git config --global color.ui true git config --global alias.co checkout git config --global alias.ci commit git config --global alias.st status git config --global alias.br branch git config --global core.editor "mate -w" # Configure Editor to use textmate git config -l #List all configurations User's git configuration file : ~/.gitconfig Frequently used Git commands Check、add...

   Git,Command     2013-03-11 19:41:06

  The danger of target=_blank and opener

When want to open a new page in a new tab on clicking a link on a page, the usual way of achieving this is to use target="_blank" property in a tag. However, the use of this leaves space for phishing website. Background parent and opener Before talking about the opener object, let's know a bit about parent object when using iframe. HTML provides a parent object which is used to communicate between the parent page and the embedded iframe element. This parent object can be accessed using...

   HTML,TARGET BLANK,REL NOOPENER,REL NOREFERRER     2018-09-15 04:53:56

  XMLHttpRequest Level 2 user guide

XMLHttpRequest is a web browser interface, it makes it possible for JavaScript doing HTTP(s) communication. Microsoft's IE5 first introduced XMLHttpRequest, because it's so useful that many other browsers also adopted this. AJAX came to the front since. However, this interface is not standardized, implementation among different browsers is different, with the emerging of HTML5, W3C is considering to standardize this interface. In February 2008, they proposed a XMLHttpRequest Level 2 draft. This ...

   XMLHttpRequest, progress, upload, binary data     2012-09-19 11:51:50

  Most Pressed Keys and Programming Syntaxes

I switch between programming languages quite a bit; I often wondered what happens when having to deal with the different syntaxes, does the syntax allow you to be more expressive or faster at coding in one language or another. I dont really know about that; but what I do know what keys are pressed when writing with different programming languages. This might be something interesting for people who are deciding to select a programming language might look into, here is a post on the...

   Keyboard,Programming language,Hottest ke     2011-09-23 13:10:10

  If a programming language was a boat…

我是受最近的一个论坛帖子启发,他的想法至今仍让我感到奇特。Turing(图灵)Turing绝对是一个双人皮划艇(感谢评论里的提醒)。它很小。人力的。它通常被当作初学者的”船“。è€...

   Programming,Turing,C,C#     2011-06-24 01:07:42

  How to check whether a web page can be loaded in iframe

Sometimes you may want to load other website's page in your own website's iframe, but due to some security concerns, other website may have security configurations which prevent you from loading their pages into your iframe. In this case, if you try to load them, you would see a blank page or a text message telling that it's prohibited. Fortunately, you can detect this before you actually decide to load it. To prevent a page from being loaded by an iframe from other site, the response ...

   HTTP,HTML,IFRAME,SECURITY,X-FRAME-OPTIONS,CONTENT-SECURITY-POLICY     2018-07-27 22:36:02