Skip to content

[caching tip] js, css 캐싱 팁

Tip 조회 수 5335 추천 수 0 2013.01.23 15:02:12

아래와 같이 스크립트로 삽입을 하면 f5, ctrl+shift+r 등에 영향을 받지 않고 계속 캐싱되어 있게 됩니다.

load.js 파일로 하나 만들어둡니다.

아래의 스크립트들은 jQuery 1.9 대응하도록 수정을 좀 한것들인데 오류가 있을 수 있습니다.


// https://developers.google.com/speed/libraries/devguide
document.write('<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">\x3C/script>');
document.write('<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js">\x3C/script>');
document.write('<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/i18n/jquery-ui-i18n.min.js">\x3C/script>');
document.write('<link rel="stylesheet" type="text/css" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/smoothness/jquery-ui.css" />');
document.write('<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">\x3C/script>');

// https://css-browser-selector.googlecode.com/
document.write('<script type="text/javascript" src="//css-browser-selector.googlecode.com/git/css_browser_selector.min.js">\x3C/script>');
// https://jqueryplaceholder.googlecode.com/
document.write('<script type="text/javascript" src="//jqueryplaceholder.googlecode.com/git/jquery.placeholder-0.2.min.js">\x3C/script>');

// http://code.google.com/p/jcaret/downloads/list
document.write('<script type="text/javascript" src="//jquery-xeno-ui.googlecode.com/git/jquery/jquery.caret.min.js">\x3C/script>');

// http://archive.plugins.jquery.com/project/timers
document.write('<script type="text/javascript" src="//jquery-xeno-ui.googlecode.com/git/jquery/jquery.timers.min.js">\x3C/script>');

// https://github.com/brandonaaron/jquery-mousewheel/downloads
document.write('<script type="text/javascript" src="//jquery-xeno-ui.googlecode.com/git/jquery/jquery.mousewheel.min.js">\x3C/script>');

// http://www.dillerdesign.com/experiment/DD_belatedPNG/
if(window.CSSBS_ie6) {
    document.write('<script type="text/javascript" src="//jquery-xeno-ui.googlecode.com/git/DD_belatedPNG_0.0.8a.min.js">\x3C/script>');
    DD_belatedPNG.fix('.iepng');
}

// http://leandrovieira.com/projects/jquery/lightbox/
document.write('<script type="text/javascript" src="//jquery-xeno-ui.googlecode.com/git/lightbox/jquery.lightbox-0.5.min.js">\x3C/script>');
document.write('<link rel="stylesheet" type="text/css" href="//jquery-xeno-ui.googlecode.com/git/lightbox/jquery.lightbox-0.5.min.css" />');

// http://www.ama3.com/anytime/
document.write('<script type="text/javascript" src="//jquery-xeno-ui.googlecode.com/git/anytime/anytime.min.js">\x3C/script>');
document.write('<script type="text/javascript" src="//jquery-xeno-ui.googlecode.com/git/anytime/anytimetz.min.js">\x3C/script>');
document.write('<link rel="stylesheet" type="text/css" href="//jquery-xeno-ui.googlecode.com/git/anytime/anytime.min.css" />'); 


팁의 라이센스 : Public Domain

profile

I see no changes, wake up in the morning and I ask myself

Is life worth living should I blast myself

Things would never be the same.

태그
엮인글 :
http://adminplay.com/166916/225/trackback
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
47 Tip 마우스 드래그시 영역 색상 변경 [selection pseudo-element(dropped)] file l2zeo 2013-01-23 4234
46 Tip 일정 포인트 이상은 적립안되게 하기 l2zeo 2013-03-15 5074
45 Tip 그누보드내에서 링크를 이용할때 \ 값이 자동 생성될때는? l2zeo 2012-09-30 5229
44 Tip DTD(Document Type Definition) 란? l2zeo 2012-10-02 5258
43 Tip css 폰트 설정시 브라우저 제약없이 비슷하게 보이게 하는방법은?? file l2zeo 2013-01-23 5274
» Tip [caching tip] js, css 캐싱 팁 l2zeo 2013-01-23 5335
41 [긴급]그누보드 4.34.05 패치 ADMINPLAY 2012-01-16 5358
40 Tip CSS shorthand properties (단축 속성) [1] l2zeo 2013-02-26 5362
39 Tip Mini Help System with jQuery file [1] l2zeo 2013-01-23 5613
38 Tip 마우스 오버할때 아이디 안보이게 하기 file l2zeo 2013-02-03 5768
37 Tip 그누보드 팁. $wr_id 값을 사용하지 않습니다_라고 뜰때 해결방법 2 (그누보드 관련 게시판이 있다면....) ADMINPLAY 2012-01-16 5838
36 Tip 그누보드 패밀리사이트에서 회원가입연동 l2zeo 2013-05-31 5914
35 Tip CSS3 를 이용한 툴팁(Tooltip) 표시 [1] l2zeo 2013-01-23 6056
34 Tip Cascading Style Sheets (자바스크립트 style 객체) l2zeo 2013-04-25 6267
33 Tip jquery 관련 l2zeo 2013-05-26 6353
32 Tip 웹 서비스 구현시 캐시 구현을 남발해서는 안되는 이유? l2zeo 2013-03-18 6572
31 Tip 그누보드 팁. $wr_id 값을 사용하지 않습니다_라고 뜰때 해결방법 3 (그누보드 관련 게시판이 있다면....) ADMINPLAY 2012-01-16 6584
30 Tip 스토리보드 이제 쉬워졌어요~~ PowerMockUp 소개 해 봅니다.^^ file l2zeo 2013-03-18 6776
29 Tip 그누보드의 visit 문제 file ADMINPLAY 2012-01-16 6789
28 Tip 모바일에서 동영상 크기 지정해서 보여줄때. l2zeo 2013-01-24 6896

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234