반응형

URI는 그것이 텍스트의 한 페이지나, 비디오 또는 사운드 클립이든, 정지 화상이든 동영상이든, 또는 프로그램이든 상관없이, 이러한 콘텐츠 들 중 어느 하나를 인식하기 위한 수단이다. 가장 보편적인 형태의 URI가 바로, 웹페이지 주소 즉, URL인데, 이는 URI의 특별한 형태이자 부분집합이라 할 수 있다. URI는 대체로 다음과 같이 설명할 수 있다.

    자원에 접근하기 위해 사용되는 절차
    어떤 자원을 가지고 있는 특정한 컴퓨터
    컴퓨터 상의 특정 자원의 이름 (파일 이름)

예를 들어 아래의 URI는 웹프로토콜 애플리케이션인 HTTP를 사용하여 액세스될 수 있는 파일을 인식하며, 그 파일은 유일한 인터넷 주소로 사상될 수 있는 www.w3.org라는 이름을 가진 컴퓨터에 존재한다.

    http://www.w3.org/Icons/WWW/w3c_main.gif

컴퓨터의 디렉토리 구조에서, 그 파일은 "/Icons/WWW/w3c_main.gif"에 위치해 있다. FTP 주소와 전자우편 주소들을 인식하는 문자열들도 역시 URI이다 (그리고 HTTP 주소처럼, 이것들도 URL이라고 불리는 URI의 부분집합이다). URI의 또다른 종류 중 하나는 URN이다. URN은 "제도적인 영속성"을 갖는 URI의 한 형태로서, 그것의 정확한 위치는 때로 변할 수 있지만, 일부 에이전시가 그것을 찾을 수 있다는 것을 의미한다. 


The What, Why and How of Data URIs in Web Design

http://webdesign.tutsplus.com/tutorials/htmlcss-tutorials/the-what-why-and-how-of-data-uris-in-web-design/





반응형
반응형

iOS6 SAFARI BUG (iOS6 사파리 버그 - AJAX, SPINNING, ...)

아이폰5 발표가 되고 조금 지나서 iOS6도 공개가 되었다.


업데이트평은

인터넷 접근 속도가 빨라졌다.

OS 전체적으로 조금 빨라졌다 라는 평이 많고..

일부 아이폰 4이하 기기를 사용하시는 분들은 느려졌다는 의견도 좀 있다.



뭐.. 그런저런 이야기는 지나가고..


개발을 하고 사용하다 보니 문제가 발생했다.

바로바로...

AJAX caching bug


사이트에서 페이지가 바뀌지 않은 상태에서

AJAX를 재호출 했을 경우 이전에 받았던 데이터를 그냥 계속 불러오는 버그가 발생하였다.


예상되는 버그 시나리오



* 최초로 A data("test.jsp")를 요청

   1. 서버로 A data를 요청

   2. 서버에서 Safari로 전달

   3. Safari에서는 해당 데이터를 캐쉬에 저장

   4. A data 제공


* 이후에 A data("test.jsp")를 요청

   1.  Safari Cache에 해당 데이터가 있는지 확인

   2.  Cache에 있는 A data 제공



해당 문제가 발생하는 이유

브라우저가 인터넷 속도를 빠르게 하기 위해서 캐시를 사용을 하게 된다.

이럴 경우 같은 주소에 대해서는 캐시를 사용하면서 생기는 문제로 보인다.



해결책


1. 주소에 쓰레기 값을 붙여서 새로운 주소로 인식하도록 한다.

ex) test.jsp?timeStamp=93939393


2. meta cache control을 추가해준다.

ex) <meta http-equiv="Cache-Control" content="no-cache" />


3. 서버 HEADER를 추가해준다.

ex) header('cache-control: no-cache');



1, 2번을 함께 적용하여 해결을 했다.


관련 URL를 참고하면 자세한 정보가 나와있으니 참고하도록.





아......... 애플.. ㅡ.ㅡ;;


ps.

iOS6 Webview에서도 동일한 증상이 발견된다.

즉............. 어플도 확인해봐야한다는 말씀?!



관련 URL

Understanding the iOS6 AJAX bugs

http://www.devthought.com/2012/09/22/understanding-the-ios6-ajax-bugs/

1. The spinning bug

2. The AJAX cache bug

3. The long-polling bug


Is Safari on iOS 6 caching $.ajax results?

http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results


AJAX Web Apps In iOS 6 Are Sort Of Broken

http://techcrunch.com/2012/09/21/ajax-web-apps-in-ios-6-are-sort-of-broken/



반응형
반응형

http://html5-demos.appspot.com/



반응형
반응형

Drag and drop a folder onto Chrome now available

As web apps evolve, you might have found it handy to let users drag and drop files from the desktop onto the browser to edit, upload, share, etc. But unfortunately, we’ve been unable to drag and drop folders onto web pages. Luckily, beginning with Chrome 21, this issue will be addressed (already available in the Chrome dev channel).

Passing multiple files with drag and drop

Let’s look at a code sample of existing drag and drop.

<div id=”dropzone”></div>

var dropzone = document.getElementById('dropzone');
dropzone.ondrop = function(e) {
  var length = e.dataTransfer.files.length;
  for (var i = 0; i < length; i++) {
    var file = e.dataTransfer.files[i];
    ... // do whatever you want
  }
};

In this example, you can actually drag and drop a file or files from the desktop to your browser, but when you try to pass a folder, notice that it will be either rejected or treated as a File object resulting in a failure.

How to handle dropped folders

Chrome 21 allows you to drop a folder or multiple folders into the browser window. To handle these, you need to change the way you handle dropped objects.

<div id=”dropzone”></div>

var dropzone = document.getElementById('dropzone');
dropzone.ondrop = function(e) {
  var length = e.dataTransfer.items.length;
  for (var i = 0; i < length; i++) {
    var entry = e.dataTransfer.items[i].webkitGetAsEntry();
    if (entry.isFile) {
      ... // do whatever you want
    } else if (entry.isDirectory) {
      ... // do whatever you want
    }
  }
};

Notice that a big difference here is that you can treat a dropped object as Entry (FileEntry or DirectoryEntry) by using new function called getAsEntry (webkitGetAsEntry).
After obtaining access to the Entry object, you can use standard file handling methods that were introduced in the FileSystem API specification. For example, this example shows how you can detect if a dropped object is a file or a directory by examining the .isFile (or the .isDirectory) field.

For further information regarding the FileSystem API, read Exploring the FileSystem APIs, regarding new drag and drop capability, read this document. Of course, these features are open standards or are waiting to become one soon.

반응형
반응형

 Integrating input[type="file"] with the Filesystem API

 - http://updates.html5rocks.com/tag/file-access


: http://html5-demos.appspot.com/static/dnd/all_types_of_import.html

Launch Demo

In a recent post, Eiji Kitamura highlighted a subtle, yet powerful new feature in the drag and drop APIs; the ability to drag in folders and retrieve them as HTML5 Filesystem API FileEntry and DirectoryEntry objects (done by accessing a new method on the DataTransferItem, .webkitGetAsEntry()).

What's remarkably cool about the .webkitGetAsEntry() extension is how elegant it makes importing files and entire folders. Once you have a FileEntry or DirectoryEntry from a drop event, it's a matter of using the Filesystem API's copyTo() to get it imported into your app.

An example of copying multiple dropped folders over to the filesystem:

var fs = null; // Cache filesystem for later.

// Not shown: setup drag and drop event listeners.
function onDrop(e) {
  e.preventDefault();
  e.stopPropagation();

  var items = e.dataTransfer.items;

  for (var i = 0, item; item = items[i]; ++i) { 
    var entry = item.webkitGetAsEntry();

    // Folder? Copy the DirectoryEntry over to our local filesystem.
    if (entry.isDirectory) {
      entry.copyTo(fs.root, null, function(copiedEntry) {
        // ...
      }, onError);
    }
  }
}

window.webkitRequestFileSystem(TEMPORARY, 1024 * 1204, function(fileSystem) {
  fs = fileSystem;
}, function(e) {
  console.log('Error', e);
});

Very nice! Again, the simplicity comes from integrating DnD with the Filesystem API calls.

Taking this one step further, we also have the ability to drag and drop a folder and/or files onto a normal <input type="file">, then access the entries as Filesystem directory or file entries. That is done through .webkitEntries:

<input type="file" multiple>

function onChange(e) {
  e.stopPropagation();
  e.preventDefault();

  var entries = e.target.webkitEntries; // Get all dropped items as FS API entries.

  [].forEach.call(entries, function(entry) {

    // Copy the entry into our local filesystem.
    entry.copyTo(fs.root, null, function(copiedEntry) {
      ...
    }, onError);

  });
}

document.querySelector('input[type="file"]').addEventListener('change', onChange);

I've put together a photo gallery demo to demonstrate these different techniques for importing files/folders.

Launch Demo

To learn more about the HTML5 Filesystem API, see Exploring the Filesystem APIs.

반응형
반응형

http://developers.facebook.com/mobile/

Build with Facebook on any Platform

Over 500 million people visit Facebook from a Mobile device each month. Mobile apps that integrate with Facebook provide a fundamentally better user experience.


Getting started

  1. Register your web app
  2. Implement the Facebook SDK
  3. Log the user in

Adding social context

  4. Use the Graph API
  5. Integrate with Social Channels

Deploying your social mobile web app

  6. Display your app properly on devices
  7. Test your integration
  8. Set icons


반응형
반응형



Zend Framework 2 is an open source framework for developing web applications and services using PHP 5.3+. Zend Framework 2 uses 100% object-oriented code and utilises most of the new features of PHP 5.3, namely namespaces, late static binding, lambda functions and closures.


다운로드 : http://framework.zend.com/


배우기 : http://www.zend.com/services/training/course-catalog/zend-framework?src=ZFsite




반응형
반응형

 RTSP는 월드와이드웹 상에서 스트리밍 데이터를 제어하는 방법에 대한 표준안이다. RTSP는 미국 컬럼비아 대학과 넷스케이프 및 RealNetworks 등에 의해 수행된 작업으로부터 비롯되었으며, 표준으로 지정 받기 위해 IETF에 제출되었다.

RTSP도 H.323과 마찬가지로, 멀티미디어 콘텐츠 패킷 포맷을 지정하기 위해 RTP를 사용한다. 그러나 H.323이 적당한 크기의 그룹간에 화상회의를 하기 위해 설계된 데 반해, RTSP는 대규모 그룹들에게 오디오 및 비디오 데이터를 효율적으로 브로드캐스트 하기 위한 목적으로 설계되었다.



반응형

+ Recent posts