'html'에 해당되는 글 4건

  1. 2016.07.13 [HTML] window.history 스펙
  2. 2009.07.27 [PERL] HTML 메일 발송 테스트
  3. 2009.01.07 [펌]웹페이지 성능 향상
  4. 2008.07.24 [펌]html meta tags

[HTML] window.history 스펙

ITWeb/개발일반 2016.07.13 17:50

window.history 스펙이라기 보다 그냥 history interface 내용을 가져온 것입니다.




enum ScrollRestoration { "auto", "manual" };

interface History {
  readonly attribute unsigned long length;
  attribute ScrollRestoration scrollRestoration;
  readonly attribute any state;
  void go(optional long delta = 0);
  void back();
  void forward();
  void pushState(any data, DOMString title, optional USVString? url = null);
  void replaceState(any data, DOMString title, optional USVString? url = null);

본 내용을 찾아본 이유는 location.href 값을 변경하고 싶었고 변경 시 reloading 되지 않도록 하기 위해서 입니다.

pushState, replaceState 를 이용하면 원하는 기능을 구현 할 수 있습니다.


window . history . length

Returns the number of entries in the joint session history.

window . history . scrollRestoration [ = value ]

Returns the scroll restoration mode of the current entry in the session history.

Can be set, to change the scroll restoration mode of the current entry in the session history.

window . history . state

Returns the current state object.

window . history . go( [ delta ] )

Goes back or forward the specified number of steps in the joint session history.

A zero delta will reload the current page.

If the delta is out of range, does nothing.

window . history . back()

Goes back one step in the joint session history.

If there is no previous page, does nothing.

window . history . forward()

Goes forward one step in the joint session history.

If there is no next page, does nothing.

window . history . pushState(data, title [, url ] )

Pushes the given data onto the session history, with the given title, and, if provided and not null, the given URL.

window . history . replaceState(data, title [, url ] )

Updates the current entry in the session history to have the given data, title, and, if provided and not null, URL.

Trackback 0 : Comment 0

[PERL] HTML 메일 발송 테스트

ITWeb/개발일반 2009.07.27 15:01

아래 글에 이어서.. 추가 입니다.

참고 URL :

sub setSendMail {
    my $message = $_[0];

    %mail = (
                To           => 'to@email.com',
                From         => 'from@email.com',
                Subject      => 'TITLE',
                'Content-type'  => 'text/html; charset="UTF-8"',
                Message      => "<span style='font-size:11px; font-family:맑은 고딕, 돋움'>$message</span>"

    if ( $message ) {
        sendmail(%mail) or die $Mail::Sendmail::error;
        print "OK. Log says:\n", $Mail::Sendmail::log;

보시는 바와 같이 빨간 부분을 추가해 주시면 됩니다.
Content-type 앞뒤로 quotation 빼먹으시면 정상적으로 적용 안되니 유의 하세요.

Trackback 0 : Comment 0

[펌]웹페이지 성능 향상

스크랩일반 2009.01.07 13:30



한번 가볍게 읽어 보세요. ^^*


1.      충분한 포트 열기

2.      다운로드하는 작은 파일 수를 제한

3.      JavaScript 파일을 JavaScript 엔진 외부에서 로드

4.      연결 유지 사용

5.      네트워크 정체 현상 식별

6.      네트워크 MTU(최대 전송 단위) TCP 크기 늘리기

7.      서버 정체 현상 식별

8.      불필요한 왕복 확인

9.      만료 날짜 설정

10.  리디렉션에 대한 재고

11.  압축 사용

12.  CSS 편집


더불어 비교해서 야후 닷컴에 근무하는 친구(제 친구는 아니구요.. )가 쓴 책인데요.



Trackback 0 : Comment 0

[펌]html meta tags

ITWeb/개발일반 2008.07.24 12:03
아직도 html 코드에 기본이 되는 태그들을 안쓰시는 분들이 많더군요.
기본적으루 좀 넣어 주자구요.. ^^*
사용자를 위한 배려 아닐런지요..
특히 커뮤니티 서비스를 만드시는 분들은.. 기본 기본..

no cache 넣어 주고 keyword 넣어 주고 description 넣어 주고... 이게 어렵나.. 흠..
이도 저도 싫으면.. no cache 라도..

<META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 1999 00:00:00 GMT">

ref. http://www.i18nguy.com/markup/metatags.html

Tag NameExample(s)Description
Author<META NAME="AUTHOR" CONTENT="Tex Texin"> The author's name.
Public - may be cached in public shared caches
Private - may only be cached in private cache
no-Cache - may not be cached
no-Store - may be cached but not archived

The directive CACHE-CONTROL:NO-CACHE indicates cached information should not be used and instead requests should be forwarded to the origin server. This directive has the same semantics as the PRAGMA:NO-CACHE.
Clients SHOULD include both PRAGMA:NO-CACHE and CACHE-CONTROL:NO-CACHE when a no-cache request is sent to a server not known to be HTTP/1.1 compliant.
Also see EXPIRES.
Note: It may be better to specify cache commands in HTTP than in META statements, where they can influence more than the browser, but proxies and other intermediaries that may cache information.

Declares the primary natural language(s) of the document. May be used by search engines to categorize by language.
CONTENT="text/html; charset=UTF-8">
The HTTP content type may be extended to give the character set. It is recommended to always use this tag and to specify the charset.
Copyright<META NAME="COPYRIGHT" CONTENT="&copy; 2004 Tex Texin"> A copyright statement.
CONTENT="...summary of web page...">
The text can be used when printing a summary of the document. The text should not contain any formatting information. Used by some search engines to describe your document. Particularly important if your document has very little text, is a frameset, or has extensive scripts at the top.
CONTENT="Mon, 22 Jul 2002 11:12:01 GMT">
The date and time after which the document should be considered expired. An illegal EXPIRES date, e.g. "0", is interpreted as "now". Setting EXPIRES to 0 may thus be used to force a modification check at each visit.
Web robots may delete expired documents from a search engine, or schedule a revisit.

HTTP 1.1 (RFC 2068) specifies that all HTTP date/time stamps MUST be generated in Greenwich Mean Time (GMT) and in RFC 1123 format.
RFC 1123 format = wkday "," SP date SP time SP "GMT"

wkday = (Mon, Tue, Wed, Thu, Fri, Sat, Sun)
date = 2DIGIT SP month SP 4DIGIT ; day month year (e.g., 02 Jun 1982)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; 00:00:00 - 23:59:59
month = (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec)

CONTENT="sex, drugs, rock & roll">
The keywords are used by some search engines to index your document in addition to words from the title and document body. Typically used for synonyms and alternates of title words. Consider adding frequent misspellings. e.g. heirarchy, hierarchy.
PRAGMA NO-CACHE<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> This directive indicates cached information should not be used and instead requests should be forwarded to the origin server. This directive has the same semantics as the CACHE-CONTROL:NO-CACHE directive and is provided for backwards compatibility with HTTP/1.0.
Clients SHOULD include both PRAGMA:NO-CACHE and CACHE-CONTROL:NO-CACHE when a no-cache request is sent to a server not known to be HTTP/1.1 compliant.
HTTP/1.1 clients SHOULD NOT send the PRAGMA request-header. HTTP/1.1 caches SHOULD treat "PRAGMA:NO-CACHE" as if the client had sent "CACHE-CONTROL:NO-CACHE".
Also see EXPIRES.
Specifies a delay in seconds before the browser automatically reloads the document. Optionally, specifies an alternative URL to load, making this command useful for redirecting browsers to other pages.



default = empty = "ALL"

The CONTENT field is a comma separated list:
INDEX: search engine robots should include this page.
FOLLOW: robots should follow links from this page to other pages.
NOINDEX: links can be explored, although the page is not indexed.
NOFOLLOW: the page can be indexed, but no links are explored.
NONE: robots can ignore the page.
NOARCHIVE: Google uses this to prevent archiving of the page. See http://www.google.com/bot.html

GOOGLEBOT <META NAME="GOOGLEBOT" CONTENT="NOARCHIVE"> In addition to the ROBOTS META Command above, Google supports a GOOGLEBOT command. With it, you can tell Google that you do not want the page archived, but allow other search engines to do so. If you specify this command, Google will not save the page and the page will be unavailable via its cache.
See Google's FAQ.

tags : html, Meta, meta tag
Trackback 0 : Comment 0