반응형

Is Safari on iOS 6 caching $.ajax results?

$.ajaxPrefilter(function (options, originalOptions, jqXHR) {
   
// you can use originalOptions.type || options.type to restrict specific type of requests
    options
.data = jQuery.param($.extend(originalOptions.data||{}, {
      timeStamp
: new Date().getTime()
   
}));
});


iOS6 Safari orientation change bug?

Safari Overflow Hidden Problem

There may be times when you need to hide the overflow (scrollbars) being visible on a page. You can specify to have all scrollbars hidden or the x and y scroll bars separately. When trying to hide the overflow of a project I was working on I realized that the ‘overflow:hidden’ was not working on the Safari browser. This was very frustrating because it worked on all other browsers except Safari. Well, there is a very simple solution to solve this problem… All you have to do is set that element to have a relative position. For instance, if you were to specify for the body to hide the horizontal scrollbars you would want to have the following css in your stylesheet:

 
body {
	position:relative;
	overflow-x:hidden;
}

iOS 6 Beta 1: HTML5 new APIs, Remote Debugging and native apps integration

Public new features for Safari on iOS 6

File uploads

Finally! We can now select an image from the Photo Library or opening the Camera from a web form. The question is about HTML Media Capture being implemented or not (see later for the answer).

Web Audio API

With the Web Audio API we can enhance HTML5 games and multimedia apps with mixing, filtering and processing operations through JavaScript.

CSS Filters

CSS 3 Filters a set of image operations (filters) that we can apply using CSS functions, such as grayscale, blur, drop-shadow, brightness and other effects. These functions will be applied before the content is rendered on screen. We can use multiple filters using spaces (similar to transforms).

Smart App Banners

It’s a way to connect websites to native applications. When you browse a web that has a related native application, Safari can show a banner inviting the user to install or open the native app. The website can also send parameters to the native app. It’s not clear how this is going to be implemented. My guess is through meta tags. The same behavior is available on Internet Explorer 10 for Windows 8.

Full Screen support on landscape

When you orient your device in landscape mode you can then move to a full-screen mode, including hiding the status bar and the Safari toolbar at the bottom. Transparent buttons are replacing the toolbar. A similar behavior is available on Nokia Browser for Symbian.  It’s not clear at this point if we can use the FullScreen API to request the feature (see later for the answer)

Remote Web Inspector

This is a big feature. Announced as a very small feature in the new APIs for developers. In the keynote there was no other information. As you may know, I’ve developed iWebInspector for iOS 5 because of the lack (or the hiding) of a web inspector tool for debugging web apps. It’s not public if this new Remote Web Inspector through LAN (like BlackBerry Remote Web Inspector) or through USB (like Google Chrome for Android)… the answer, later in this post.

Crossfade CSS Function

This feature was published in the keynote with “font-face: 3px” but I’ve seen it. It’s an image function that will create a crossfade between two images (Spec draft), for example:

1.background-image: -webkit-cross-fade(url("image1.png"),  url("image2.png"), 40%);

Will it work with transitions?

Other announced features and questions

iCloud Tabs

You can synchronize your tabs between all your devices, including Macs, iPhones and iPads. So the same URL will be distributed through all devices. Be careful on your mobile web architecture!

Offline Reading List

when the user adds a page to the reading list it will be also downloaded and precache. Is there any API to know if our page is being executed from the cache?

Maps

Google Maps native app was replaced by a new Maps app (directly from Apple). The question is, is this app still capturing http://maps.google.com URLs? (I hope not) and how to open the native app or driving instructions from a web.

Twitter and Facebook

Both social networks are not integrated in the operating system. It will be good if at some point web apps can also use these credentials.

Questions from the past

WebGL? IndexedDB? getUserMedia (camera access)? Nitro engine on Web Views?

반응형
반응형
/*+ ALL_ROWS */

  ALL_ROWS는 Full Table Scan을 선호하며 CBO(Cost Based Optimization)는 default로 ALL_ROWS를 선택 합니다.

 
SQL> SELECT /*+ ALL_ROWS */  ename, hiredate 
     FROM emp  
     WHERE ename like '%%%';
       
Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=HINT: ALL_ROWS (Cost=1 Card=5 Bytes=80)
   1    0   TABLE ACCESS (FULL) OF 'EMP' (Cost=1 Card=5 Bytes=80)
    

 

/*+ CHOOSE */

  Hint Level의 CHOOSE는 RBO(Rule Based Optimization)인지 CBO(Cost Based Optimization) 인지를 선택 합니다. 만약 주어진 table의 통계 정보가 없다면 Rule Based 접근 방식을 사용 합니다.

 

/*+ FIRST_ROWS */

  Full Table Scan보다는 index scan을 선호하며 Interactive Application인 경우 best response time을 제공 합니다. 또한 sort merge join보다는 nested loop join을 선호 합니다.

 
SQL> SELECT /*+ FIRST_ROWS */  ename 
     FROM emp 
     WHERE empno=7876;
 
Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=HINT: FIRST_ROWS (Cost=1 Card=1 Bytes=20)
   1    0   TABLE ACCESS (BY INDEX ROWID) OF 'EMP' (Cost=1 Card=1 Bytes=20)
   2    1     INDEX (RANGE SCAN) OF 'PK_EMP' (UNIQUE) (Cost=1 Card=1)
    

 

/*+ RULE */

  Rule Based 접근 방식을 사용하도록 지정 합니다.

 

/*+ CLUSTER(table_name) */

  Cluster Scan을 선택하도록 지정한다. 따라서 clustered object들에만 적용 됩니다.

 

/*+ FULL(table_name) */

  Table을 Full Scan하길 원할 때 사용 합니다.

 

/*+ HASH(table) */

  Hash scan을 선택하도록 지정한다. 이 hint는 HASHKEYS parameter를 가지고 만들어진 cluster내에 저장된 table에만 적용이 됩니다.

 

/*+ INDEX(table_name index_name) */

  지정된 index를 강제적으로 쓰게끔 지정 합니다.

 

/*+ INDEX_ASC(table_name index_name) */

  지정된 index를 오름차순으로 쓰게끔 지정 합니다. Default로 Index Scan은 오름차순 입니다

 

/*+ INDEX_DESC(table_name index_name) */

  지정된 index를 내림차순으로 쓰게끔 지정 합니다.

  아래 예제는 제일 큰 것 하나만 조회되므로, max 함수의 기능을 대신할 수 있습니다.

 
SQL> SELECT /*+ index_desc(emp pk_emp) */  empno
     FROM   emp
     WHERE  rownum = 1 ;
    

 

/*+ INDEX_FFS(table index) */

  Full table scan보다 빠른 Full index scan을 유도 합니다.

 

/*+ ORDERED */

  From절에 기술된 테이블 순서대로 join이 일어나도록 유도 합니다.

 

/*+ USE_HASH (table_name) */

  각 테이블간 HASH JOIN이 일어나도록 유도 합니다.

 

*+ USE_MERGE (table_name) */

  지정된 테이블들의 조인이 SORT-MERGE형식으로 일어나도록 유도 합니다.

 

/*+ NOPARALLEL(table_name) */

  NOPARALLEL hint를 사용하면, parallel query option을 사용하지 않도록 할 수 있다.

 

/*+ PARALLEL(table_name, degree) */

  PARALLEL hint를 사용하면 query에 포함된 table의 degree를 설정할 수 있습니다.

  예를 들어, 다음과 같이 hint를 적어 degree 4로 parallel query option을 실행하도록 할 수 있습니다. 이 때 parallel이란 글자와 괄호( '(' )사이에 blank를 넣지 않도록 주의해야 합니다.

 
SQL> SELECT /*+ PARALLEL(emp, 4) */   * 
     FROM emp;
    

 

DEGREE의 의미 및 결정

  Parallel Query에서 degree란 하나의 operation 수행에 대한 server process의 개수 입니다. 이러한 degree 결정에 영향을 주는 요인들에는 다음과 같은 것들이 있습니다.

  • (1) system의 CPU 갯수
  • (2) system의 maximum process 갯수
  • (3) table이 striping되어 있는 경우, 그 table이 걸쳐있는 disk의 갯수
  • (4) data의 위치 (즉, memory에 cache되어 있는지, disk에 있는지)
  • (5) query의 형태 (예를 들어 sorts 혹은 full table scan)

  한 사용자만이 parallel query를 사용하는 경우, sorting이 많이 필요한 작업과 같은 CPU-bound 작업의 경우는 CPU 갯수의 1 ~ 2배의 degree가 적당하며, sorting보다는 table scan과 같은 I/O bound 작업의 경우는 disk drive 갯수의 1 ~ 2배가 적당합니다.

  동시에 수행되는 parallel query가 많은 경우에는 위의 각 사용자의 degree를 줄이거나 동시에 사용하는 사용자 수를 줄여야 합니다.

반응형
반응형

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/



반응형
반응형
많이 넘어져본 사람일수록 쉽게 일어선다.
반대로 넘어지지 않는 방법만을 배우면
결국에 일어서는 방법을 모르게 된다.
걸핏하면 넘어지는 사람은 ‘나는 일어서기의 명수’라는
자부심을 가져라. 그것이 인생을 즐겁게 사는 비결이다.
-사이토 시게타(‘나를 위한 하루 선물’에서 인용)

넘어지지 않고서 걷기를 배우는 어린아이는 없습니다.
넘어지지 않고 자전거타기를 배울 수도 없습니다.
시행착오 없이 바로 큰 성과를 얻는 것은 대단히 힘든 일입니다.
혹 그렇게 된다 하더라도
그게 꼭 바람직하다고만 할 수도 없습니다.
더 큰 미래의 실패를 잉태하고 있을 수 있기 때문입니다

반응형
반응형
고요한
한 소녀의 눈동자를 바라보며
시인은 사랑을 느낀다. 반짝이는 눈동자,
조그만 감동에도 곧잘 눈물에 젖는 그녀의 눈.
산다는 것의 모든 환희와 아픔을 함께 살고 있는
너의 눈동자. 때때로 나이 들어 아름다운 소녀의
눈동자를 보면, 질투가 날만큼 파랗고
생기와 생명력이 충일한
매력을 본다.

- 민용태의《시에서 연애를 꺼내다》중에서 -


* 옹달샘도
링컨학교 학생들의
반짝이는 눈동자로 생기가 가득합니다.
처음 올 때는 수줍고 어둡던 눈동자가 하루이틀 지나면서
생명력이 넘치는 초롱초롱한 눈동자로 바뀝니다.
얼마나 대견하고 사랑스러운지 모릅니다.
그 반짝이는 눈동자에서 희망을 봅니다.
어린 꿈나무들의 밝은 미래를 보고
우리의 미래를 봅니다.

반응형

'생활의 발견 > 아침편지' 카테고리의 다른 글

나는 너를 한눈에 찾을 수 있다  (0) 2012.09.28
스스로 낫는 힘  (0) 2012.09.27
'마음의 기술' 하나만으로...  (0) 2012.09.25
푸른 우물  (0) 2012.09.24
하루에 한끼만 먹어라  (0) 2012.09.22
반응형

세상에는 일곱 가지 죄가 있다.

노력 없는 부,

양심 없는 쾌락,

인격 없는 지식,

도덕성 없는 상업,

인성 없는 과학,

희생 없는 기도,

원칙 없는 정치가 그것이다.

- 마하트마 간디

반응형
반응형

  IOS6 업데이트 이후 세션 문제


- IOS 6.0 사파리 브라우져의 [쿠키허용] 정책 변경

- 기존 설정 (쿠키 허용에 대한 정책 설정)으로는 결제시 안심클릭 카드사 인증에 대한 세션을 유지하지 못하게 되면

결제 진행 불가 (카드사 인증창 호출 불가)현상 발생 할 수 있음

 

1. 기존(IOS 6.0이전) 쿠키 허용 기본 값 : “방문한 곳” or “항상” 설정시 결제이용 가능 (세션유지가 가능)

2. 변경(IOS 6.0 이후) : “항상” 설정 시에만 세션유지 가능. “방문한곳”, “안함” 일 경우 세션 단절


반응형
반응형

 끝을 맺기를 처음과 같이 하면 실패가 없다. - 노자

반응형

+ Recent posts