JP6327959B2 - Information processing terminal, cache control method, and web system - Google Patents

Information processing terminal, cache control method, and web system Download PDF

Info

Publication number
JP6327959B2
JP6327959B2 JP2014116209A JP2014116209A JP6327959B2 JP 6327959 B2 JP6327959 B2 JP 6327959B2 JP 2014116209 A JP2014116209 A JP 2014116209A JP 2014116209 A JP2014116209 A JP 2014116209A JP 6327959 B2 JP6327959 B2 JP 6327959B2
Authority
JP
Japan
Prior art keywords
web browser
processing terminal
information processing
cache
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014116209A
Other languages
Japanese (ja)
Other versions
JP2015230564A (en
Inventor
祐貴 白河
祐貴 白河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014116209A priority Critical patent/JP6327959B2/en
Publication of JP2015230564A publication Critical patent/JP2015230564A/en
Application granted granted Critical
Publication of JP6327959B2 publication Critical patent/JP6327959B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、例えばHTML5等における新たなウェブブラウザ用のデータストレージの仕組みを提供する技術に関する。   The present invention relates to a technique for providing a new data storage mechanism for a web browser in, for example, HTML5.

Webアプリケーションの高機能化に伴い、HTML5では各種機能拡張がなされている。特に、スマートフォンやタブレットなどの携帯端末の普及により、オフラインでWebアプリケーションを動作させるための拡張が多くなされている。例えば、サーバ上のファイルをWebブラウザ内にキャッシュするアプリケーションキャッシュ機能、Webブラウザ内にデータを格納するためのWeb StorageあるいはIndexedDB機能がある。キャッシュさせたいファイルなどを記述したキャッシュマニフェスト(以下、単にマニフェストと呼ぶ)をWebサーバから取得し、Webブラウザがそのマニフェストにしたがってキャッシュすることで、オフライン時でもWebサイトの閲覧を可能にする。しかし、この機能により特定のWebサイトだけでアプリケーションキャッシュやWeb Storageなどのデータの領域を専有してしまう可能性がある。これに対処するために、Webサイトごとにキャッシュできる容量の上限が決まっており、また、指定したWebサイトのキャッシュを削除する機能も提供されている。   Various functions have been expanded in HTML5 as Web applications become more sophisticated. In particular, with the widespread use of mobile terminals such as smartphones and tablets, many extensions have been made to operate Web applications offline. For example, there is an application cache function that caches a file on a server in a Web browser, and a Web Storage or IndexedDB function for storing data in the Web browser. A cache manifest describing a file to be cached (hereinafter simply referred to as a manifest) is acquired from the Web server, and the Web browser caches in accordance with the manifest, thereby enabling browsing of the Web site even when offline. However, this function may occupy a data area such as an application cache or Web Storage only on a specific Web site. In order to cope with this, the upper limit of the capacity that can be cached for each Web site is determined, and a function for deleting the cache of the specified Web site is also provided.

ここで、アプリケーションキャッシュ機能でファイルをキャッシュする際の制御方法に関する従来技術として特許文献1がある。特許文献1の技術は、アプリケーションキャッシュ機能を有するWebブラウザが、サーバから提供されるマニフェストを検知すると、それを視覚的にユーザに通知し、キャッシュするかどうかの判断を求めるものである。   Here, there is Patent Document 1 as a related art regarding a control method when a file is cached by an application cache function. In the technique of Patent Document 1, when a Web browser having an application cache function detects a manifest provided from a server, the technique is visually notified to the user to determine whether to cache.

特表2012−501498号公報Special table 2012-501498 gazette

前述したHTML5での拡張機能について、Webブラウザのアプリケーションキャッシュにファイルをキャッシュさせるためには、サービス提供者があらかじめ、マニフェストをWebサーバ上に配置する必要がある。その上で、HTML(HyperText Markup Language)要素の属性として当該マニフェストを指定することで、アプリケーションキャッシュに対応したWebブラウザであれば、キャッシュを行うことができる。また、このマニフェストは1つのHTML要素につき1つだけ指定することができる。   In order to cache the file in the application cache of the Web browser for the extended function in HTML5 described above, the service provider needs to place a manifest on the Web server in advance. In addition, by designating the manifest as an attribute of an HTML (HyperText Markup Language) element, any Web browser corresponding to the application cache can be cached. Further, only one manifest can be specified for one HTML element.

昨今、異なる端末、異なるWebブラウザからのアクセスに対応すべく、レスポンシブルWebデザインを採用するWebサイトがあり、そのようなWebサイトは単一のHTMLファイルで構成されている場合が多い。そのため、現在のアプリケーションキャッシュ機能の仕様だと、端末やブラウザに適した異なるファイルをキャッシュさせることができない。例えば、端末の画面に見合わない過大な画像ファイルやWebブラウザによっては再生できないファイルフォーマットの動画ファイルなど、不要・不適切なファイルをキャッシュさせてしまうという課題がある。   In recent years, there are Web sites that employ a Responsible Web Design in order to cope with access from different terminals and different Web browsers, and such Web sites are often composed of a single HTML file. Therefore, the current application cache function specification cannot cache different files suitable for terminals and browsers. For example, there is a problem that unnecessary / inappropriate files are cached, such as an excessively large image file that does not match the terminal screen or a moving image file in a file format that cannot be played back by a Web browser.

上記特許文献1は、ファイルのキャッシュ処理の前に、ユーザが明示的にファイルをキャッシュさせるか否かの判断ができた。しかし、従来技術は、マニフェストに書かれたファイルを全てキャッシュさせるか全てキャッシュさせないかという選択しかできない。そのため、個々のファイルに対してキャッシュさせるかさせないか、あるいは例えば代替のファイルを選択できるようにするか、といったキャッシュ制御ができないという問題があった。   According to the above-mentioned patent document 1, it is possible to determine whether or not a user explicitly caches a file before the file is cached. However, the prior art can only select whether all files written in the manifest are cached or not cached. For this reason, there is a problem in that it is impossible to perform cache control, such as whether to cache each file or whether an alternative file can be selected, for example.

本発明は、上記問題を解決するためになされたものであり、Webサイトからアプリケーションキャッシュにキャッシュを行う際に、端末やWebブラウザに応じてキャッシュさせるファイルを制御する手法を提供することを目的とする   The present invention has been made to solve the above problem, and an object of the present invention is to provide a method for controlling a file to be cached according to a terminal or a web browser when caching from an website to an application cache. Do

上記目的を達成するために本発明は以下の構成を有する。すなわち、ウェブブラウザが動作する情報処理端末であって、前記ウェブブラウザによりアクセスしたウェブサイトが提供するマニフェストファイルを解析する解析手段と、前記マニフェストファイルに従って前記ウェブブラウザのための保存領域へデータをキャッシュデータとして格納する格納制御手段とを有し、前記格納制御手段は、前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかに基づき、前記解析手段による前記マニフェストファイルの解析の結果に従って、前記キャッシュデータとして格納すべきデータを決定する。   In order to achieve the above object, the present invention has the following configuration. That is, an information processing terminal in which a web browser operates, an analysis unit that analyzes a manifest file provided by a website accessed by the web browser, and caches data in a storage area for the web browser according to the manifest file Storage control means for storing as data, wherein the storage control means is configured to analyze the manifest file by the analysis means based on at least one of environment information of the information processing terminal and policy setting information of the web browser. Data to be stored as the cache data is determined according to the result.

本発明によれば、条件に応じたキャッシュ制御が可能となり、不要・不適切なファイルのキャッシュを回避できる。   According to the present invention, cache control according to conditions can be performed, and unnecessary and inappropriate file caching can be avoided.

ネットワーク構成図Network configuration diagram Webブラウザの構成を示すブロック図Block diagram showing the configuration of the Web browser 情報端末104のハードウェア構成の一例を示すブロック図The block diagram which shows an example of the hardware constitutions of the information terminal 104 情報端末107のハードウェア構成の一例を示すブロック図The block diagram which shows an example of the hardware constitutions of the information terminal 107 一般的なマニフェストの記述例を示す図Diagram showing a typical manifest description example Webブラウザ201による書き換え前後のマニフェストの例を示す図The figure which shows the example of the manifest before and after rewriting by the Web browser 201 アプリケーションキャッシュの内容の例を示す図Figure showing an example of the contents of the application cache アプリケーションキャッシュへのキャッシュ手順例を示すフローチャートFlowchart showing an example of caching procedure to application cache マニフェストを制御文にしたがって書き換える手順例を示すフローチャートFlow chart showing an example of the procedure for rewriting the manifest according to the control statement キャッシュポリシによるキャッシュ制御のための設定画面の一例を示す図The figure which shows an example of the setting screen for the cache control by a cache policy キャッシュポリシによるキャッシュ制御のためのマニフェストの記述例を示す図The figure which shows the example of description of the manifest for the cache control by the cache policy キャッシュポリシが適用されたときの通知画面の一例を示す図The figure which shows an example of the notification screen when a cache policy is applied

以下、本発明を実施するための形態について図面を用いて説明する。
[実施例1]
<ウェブシステムの構成>
図1は、本システムのネットワーク構成例を示す図である。情報処理装置104は、光回線などでプロバイダ103と通信し、プロバイダ103を介してインターネット102と繋がるPC(パーソナルコンピュータ(Personal Computer))などである。情報処理端末107は基地局106と無線で通信し、コアネットワーク105を介してインターネット102と繋がる端末で、例えばタブレットやスマートフォンなどである。情報処理端末107には、デスクトップPCなども含まれる。Webサーバ101(ウェブサーバ)は、インターネット102を介し、各情報処理端末にWebサイト(ウェブサイト)を提供するシステムである。
Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.
[Example 1]
<Web system configuration>
FIG. 1 is a diagram illustrating a network configuration example of the present system. The information processing apparatus 104 is a PC (Personal Computer) or the like that communicates with the provider 103 via an optical line or the like and is connected to the Internet 102 via the provider 103. The information processing terminal 107 is a terminal that communicates with the base station 106 wirelessly and is connected to the Internet 102 via the core network 105, and is, for example, a tablet or a smartphone. The information processing terminal 107 includes a desktop PC and the like. The Web server 101 (Web server) is a system that provides a Web site (Web site) to each information processing terminal via the Internet 102.

図2は、本発明を実施したWebブラウザ(ウェブブラウザ)201の全体構成を示すブロック図である。
ユーザインターフェース(UI)202は、URL表示や、ブックマーク表示、Webブラウザの設定メニュー表示などを含むWebブラウザのUIである。レンダリングエンジン204は、HTMLなどの要求されたコンテンツの表示を行う。ブラウザエンジン203は、UI202とレンダリングエンジン204の間の処理を行う。ネットワーキング205は、HTTP(Hypertext Transfer Protocol)リクエストなどのネットワークの呼び出しを受け付ける。JAVA(登録商標)スクリプトインタープリタ(以下、JSインタープリタ)206は、JAVAスクリプトコードの解析と実行を行う。
FIG. 2 is a block diagram showing an overall configuration of a web browser (web browser) 201 embodying the present invention.
A user interface (UI) 202 is a UI of a Web browser including URL display, bookmark display, Web browser setting menu display, and the like. The rendering engine 204 displays requested content such as HTML. The browser engine 203 performs processing between the UI 202 and the rendering engine 204. The networking 205 accepts network calls such as HTTP (Hypertext Transfer Protocol) requests. A JAVA (registered trademark) script interpreter (hereinafter referred to as JS interpreter) 206 analyzes and executes JAVA script code.

データストレージ207は、クッキーやHTML5に係るストレージの仕様に基づくアプリケーションキャッシュ、ウェブストレージ(WebStorage)、IndexedDBのデータを記憶装置の保存領域に保存する制御を行う。データストレージ207によるデータ保存や削除などの操作は、JAVAスクリプトにしたがい、制御可能である。   The data storage 207 performs control to save application cache, web storage (Indexed DB) data, and indexed DB data in a storage area of a storage device based on specifications of cookies and storage related to HTML5. Operations such as data storage and deletion by the data storage 207 can be controlled according to JAVA scripts.

図3は、情報処理装置104のハードウェア構成を示すブロック図である。CPU301は、RAM303をワークメモリとして、ROM302および記憶装置としてのハードディスクドライブ(HDD)308に格納されたプログラムを実行し、システムバス312を介して後述する各構成を制御する。HDD308は、オペレーティングシステム(OS)や各種プログラムやデータを格納する。CPU301は、ディスクコントローラ(DKC)306を介して、HDD308およびディスクドライブ309にアクセスし、各種プログラムなどをHDD308にインストールする。CPU301は、ネットワークインタフェイスカード(NIC)307を介して、ネットワーク313を介した他のコンピュータなどとも通信可能である。   FIG. 3 is a block diagram illustrating a hardware configuration of the information processing apparatus 104. The CPU 301 uses the RAM 303 as a work memory, executes a program stored in a ROM 302 and a hard disk drive (HDD) 308 as a storage device, and controls each configuration described later via a system bus 312. The HDD 308 stores an operating system (OS), various programs, and data. The CPU 301 accesses the HDD 308 and the disk drive 309 via the disk controller (DKC) 306 and installs various programs and the like in the HDD 308. The CPU 301 can communicate with other computers via the network 313 via a network interface card (NIC) 307.

CPU301は、プログラムにしたがい、ビデオカード(VC)305を介してモニタ311にUIを表示する。ユーザは、キーボード(KB)310やマウスなどのポインティングデバイスを操作して、UIに対する指示や入力を行なう。CPU301は、キーボードコントローラ(KBC)304を介してユーザ指示や入力を受け付け、ユーザ指示や入力に応じて様々な処理を実行する。   The CPU 301 displays a UI on the monitor 311 via the video card (VC) 305 according to the program. The user operates a pointing device such as a keyboard (KB) 310 and a mouse to give instructions and inputs to the UI. The CPU 301 receives user instructions and inputs via a keyboard controller (KBC) 304, and executes various processes according to the user instructions and inputs.

図4は、Webブラウザ201が動作することが可能な情報処理端末107のハードウェア構成を示すブロック図である。図4において、情報処理端末107は、アプリケーションプロセッサ(以下、AP)407、ROM401、RAM402、フラッシュSSDなどで構成される記憶装置403を備える。AP407は、ROM401や記憶装置403に記憶されたソフトウェア(すなわちプログラム)を実行し、AP407に接続された各デバイスを総括的に制御する。RAM402は、AP407の主メモリあるいはワークエリアなどとして機能する。記憶装置403は、オペレーティングシステム、Webブラウザなどの各種アプリケーション、データベースデータ、ユーザファイルなどを記憶する。410は、タッチスクリーンコントローラであり、同コントローラに接続されたタッチスクリーン411を制御する。   FIG. 4 is a block diagram illustrating a hardware configuration of the information processing terminal 107 on which the Web browser 201 can operate. 4, the information processing terminal 107 includes a storage device 403 including an application processor (hereinafter referred to as AP) 407, a ROM 401, a RAM 402, a flash SSD, and the like. The AP 407 executes software (that is, a program) stored in the ROM 401 or the storage device 403, and comprehensively controls each device connected to the AP 407. The RAM 402 functions as a main memory or work area of the AP 407. The storage device 403 stores various applications such as an operating system and a Web browser, database data, user files, and the like. A touch screen controller 410 controls a touch screen 411 connected to the controller.

無線LAN制御部404、移動体通信制御部405、近距離無線通信制御部406は、それぞれ、WiFi(Wireless Fidelity)などの無線LAN通信、移動体通信(モバイル通信など)、近距離無線通信の制御を行う。さらに情報処理端末107において、電源制御部408は、充電池409への充電制御や電池残量の管理を行う。   The wireless LAN control unit 404, the mobile communication control unit 405, and the short-range wireless communication control unit 406 control wireless LAN communication such as WiFi (Wireless Fidelity), mobile communication (such as mobile communication), and short-range wireless communication, respectively. I do. Further, in the information processing terminal 107, the power supply control unit 408 performs charge control on the rechargeable battery 409 and management of the remaining battery level.

図4は、本発明が適用可能な情報処理端末107の構成の一例である。したがって、情報処理端末107に、図示以外のネットワーク接続を提供するためのハードウェアや、カメラなどのハードウェアなどを更に備えていてもよい。また、例えば近距離無線通信制御部406などの一部の構成が無くても、本発明に適用可能である。   FIG. 4 shows an example of the configuration of the information processing terminal 107 to which the present invention can be applied. Therefore, the information processing terminal 107 may further include hardware for providing a network connection other than that illustrated, hardware such as a camera, and the like. Further, for example, the present invention can be applied to the present invention even if there is no partial configuration such as the short-range wireless communication control unit 406.

<マニフェストファイルの構成>
図5はマニフェストファイル(以下単にマニフェストと呼ぶ。)の一例である。マニフェストの先頭に文字列「CACHE MANIFEST」を記述する必要がある。これに続いて、CACHEヘッダ、NETWORKヘッダ、FALLBACKヘッダが順に記述される。
「CACHE:」ヘッダの後に列挙したファイルは、Webサイトに初めてアクセスしてマニフェストがダウンロードされた後に、明示的にWebブラウザ201のアプリケーションキャッシュに保存される。
「NETWORK:」ヘッダの後に列挙するのは、Webサーバへの接続を必要とするファイルである。ここで指定されたファイルについては、Webブラウザはオフラインキャッシュではなく常にWebサーバ上のファイルを参照する。
「FALLBACK:」ヘッダの後には、Webブラウザ201がファイルにアクセスできない場合に表示するページが記述される。
「#」で始まる行はコメントアウト行である。コメントアウト行は従来のWebブラウザにおいては解釈の対象とならないが、Webブラウザ201においては解釈の対象とする。
<Configuration of manifest file>
FIG. 5 is an example of a manifest file (hereinafter simply referred to as a manifest). It is necessary to describe the character string “CACHE MANIFEST” at the beginning of the manifest. Following this, a CACHE header, a NETWORK header, and a FALLBACK header are described in order.
The files listed after the “CACHE:” header are explicitly stored in the application cache of the web browser 201 after the manifest is downloaded by accessing the website for the first time.
Listed after the “NETWORK:” header are files that require connection to a Web server. For the file specified here, the Web browser always refers to the file on the Web server, not the offline cache.
A page to be displayed when the Web browser 201 cannot access the file is described after the “FALLBACK:” header.
Lines beginning with “#” are commented out lines. The commented-out line is not subject to interpretation in the conventional web browser, but is subject to interpretation in the web browser 201.

アプリケーションキャッシュが更新されるのは、Webサイトを運営する管理者などによりマニフェスト自身が変更された時だけである。そのため、画像ファイルをファイル名はそのままで編集した場合など、キャッシュ対象のファイルが変更されてもマニフェストが変更されない限りは、そのファイルは再キャッシュされない。その場合、コメント行に更新日付やバージョン番号などを記載して更新することにより、新しいファイルがキャッシュされるようになる。   The application cache is updated only when the manifest itself is changed by an administrator operating the website. For this reason, even if the image file is edited without changing the file name, the file is not recached unless the manifest is changed even if the file to be cached is changed. In that case, a new file is cached by updating the comment line with the update date and version number.

ユーザが再度Webサイトを閲覧した際に、Webブラウザ201はマニフェストにしたがって、キャッシュしたファイルを使用するように記述されているファイルは、Webサーバから再度取得せずにキャッシュを使用するようになる。   When the user browses the Web site again, the Web browser 201 uses the cache without acquiring again from the Web server the file described to use the cached file according to the manifest.

このようにして、ネットワークがオフラインになった場合でも、Webブラウザ201で管理されるキャッシュを使用することで、Webサイトが提供するサービスを利用することができる。   In this way, even when the network goes offline, the service provided by the website can be used by using the cache managed by the web browser 201.

図6(a)は、Webブラウザ201が解釈できる制御文をマニフェストのコメントアウト行に記述した例を示す図である。この制御文をWebブラウザ201が解釈することにより、キャッシュ制御を行う。キャッシュ制御とは、Webブラウザ201が、マニフェストに記述された個々のファイルに対して、本来キャッシュするファイル、すなわちキャッシュデータとして保存するファイルの代替ファイルをキャッシュすることや、キャッシュしないことなどを指す。マニフェストのコメントアウト行に制御文を記述することで、制御文を解釈できないWebブラウザであっても、通常通りにマニフェストの内容を解釈することが可能である。Webブラウザ201は、Webブラウザ201が生成するユーザエージェントに応じて、マニフェストの制御文の条件に一致するファイルのキャッシュ制御を行う。ユーザエージェントには、たとえばWebブラウザ名や、デバイスの種類等の環境を示す情報が含まれている。制御文で使用する項目名(Webブラウザ名やデバイス種類を示す項目名)は、それらの情報と関連付けられており、項目名にしたがって関連付けられた情報が参照される。また本例に示す制御文は、条件を示す「if」「else」等の文字列と、それらに続く条件(丸かっこで記述される)、条件に応じて実行される動作(波かっこで記述される)とで構成される。   FIG. 6A is a diagram illustrating an example in which a control statement that can be interpreted by the Web browser 201 is described in a comment-out line of the manifest. Cache control is performed by the Web browser 201 interpreting this control statement. The cache control means that the Web browser 201 caches or does not cache a file that is originally cached, that is, a file that is stored as cache data, for each file described in the manifest. By describing the control statement in the commented-out line of the manifest, even the Web browser that cannot interpret the control statement can interpret the contents of the manifest as usual. The web browser 201 performs cache control of a file that matches the condition of the manifest control statement in accordance with the user agent generated by the web browser 201. The user agent includes information indicating the environment such as a Web browser name and a device type. Item names (item names indicating the Web browser name and device type) used in the control statement are associated with the information, and the associated information is referred to according to the item name. In addition, the control statement shown in this example is a character string such as “if” or “else” indicating a condition, a condition following the character string (described in parentheses), and an action executed according to the condition (described in curly braces). )).

例として、使用している端末がPCで、且つ、使用しているWebブラウザ201の名前が「browserB」である場合について説明する。制御文601の一行目の実行条件は、「device」(端末の意)が「PC」であって、且つ、「browser」(使用しているWebブラウザ201の名前)が「browserA」であることである。使用しているWebブラウザ201が、この条件に一致すると判断した場合、script.jsの代わりにscript_browserA_pc.jsを代わりにキャッシュする。今回の例では、Webブラウザ201は、制御文601の一行目の実行条件に一致しないと判断する。制御文601の二行目は、Webブラウザ201が、制御文601の一行目の条件に一致しないと判断した場合に実行される制御文である。この制御文にはさらに実行条件が記述されており、その実行条件は、使用しているWebブラウザ201の名前が「browserB」であることである。使用しているWebブラウザ201が、この条件に一致すると判断した場合、script.jsの代わりにscript_browserB.jsを代わりにキャッシュする。今回の例では、Webブラウザ201は、制御文601の二行目の実行条件に一致すると判断する。同様に、制御文602では、使用しているWebブラウザ201が「browserB」であればmovie.flvを、それ以外のWebブラウザ201であればmovie.mp4をキャッシュしないようにしている。今回の例では、使用しているWebブラウザ201が「browserB」であるため、Webブラウザ201は、movie.flvをキャッシュしないようにしている。この図6(a)の例では、カレントパスのディレクトリにある、図6(a)のマニフェストを指定したHTMLファイルと、同じディレクトリに置かれたJPEGイメージファイルimage.jpg、音声ファイルmusic.mp3、スタイルシートstyle.cssがキャッシュされる。また制御文により、JAVA(登録商標)スクリプトファイルscript.jsに関しては、条件に応じたファイルが代わりにキャッシュされ、映像ファイルmovie.flvおよびmovie.mp4については条件に応じてキャッシュされない。   As an example, a case where the terminal being used is a PC and the name of the Web browser 201 being used is “browserB” will be described. The execution condition of the first line of the control statement 601 is that “device” (terminal meaning) is “PC” and “browser” (name of the Web browser 201 being used) is “browser A”. It is. If the Web browser 201 being used determines that this condition is met, script. instead of js, script_browserA_pc. Cache js instead. In this example, the Web browser 201 determines that the execution condition in the first line of the control statement 601 does not match. The second line of the control statement 601 is a control statement that is executed when the Web browser 201 determines that the condition of the first line of the control statement 601 does not match. This control statement further describes an execution condition. The execution condition is that the name of the Web browser 201 being used is “browserB”. If the Web browser 201 being used determines that this condition is met, script. script_browserB. instead of js. Cache js instead. In this example, the Web browser 201 determines that the execution condition on the second line of the control statement 601 matches. Similarly, in the control statement 602, if the Web browser 201 being used is “browserB”, movie. If flv is a web browser 201 other than that, movie. mp4 is not cached. In this example, since the Web browser 201 being used is “browserB”, the Web browser 201 is mobile. The flv is not cached. In the example of FIG. 6A, the HTML file specifying the manifest of FIG. 6A in the directory of the current path and the JPEG image file image. jpg, audio file music. mp3, style sheet style. css is cached. Further, a JAVA (registered trademark) script file script. For js, the file according to the condition is cached instead, and the video file movie. flv and movie. mp4 is not cached depending on the condition.

以上のように、マニフェストに記述した制御文の解釈により、端末あるいはWebブラウザに適したキャッシュ制御が可能になる。厳密には、Webブラウザ201が、図6(a)の制御文を解釈し、マニフェストを書き換え、その書き換えたマニフェストにしたがってキャッシュしている。今回の例では、使用している端末が「PC」で、且つ、使用しているWebブラウザ201が「browserB」であるため、図6(a)は図6(b)のように書き換えられる。すなわち、文字列script.jsは、script_browserB.jsに置換され、文字列movie.flvは削除される。   As described above, the cache control suitable for the terminal or the Web browser can be performed by interpreting the control statement described in the manifest. Strictly speaking, the Web browser 201 interprets the control statement in FIG. 6A, rewrites the manifest, and caches it according to the rewritten manifest. In this example, since the terminal being used is “PC” and the Web browser 201 being used is “browserB”, FIG. 6A is rewritten as shown in FIG. That is, the character string script. js is the script_browserB. js and the character string movie. flv is deleted.

なお、制御文の条件判断に用いる情報は、Webブラウザ201により生成される情報であれば、ユーザエージェントに限定しない。また、コメントアウト行に記述できる制御文は図6(a)で使用したスクリプト言語に限定されず、Webブラウザ201が解釈できる文字列であればよい。   Note that the information used for determining the condition of the control statement is not limited to the user agent as long as it is information generated by the Web browser 201. The control statement that can be described in the comment-out line is not limited to the script language used in FIG. 6A, and any character string that can be interpreted by the Web browser 201 may be used.

<アプリケーションキャッシュの例>
図7は、アプリケーションキャッシュの内容の例を示す図である。オリジナルマニフェスト名701はWebブラウザ201に書き換えられる前のオリジナルのマニフェストを示し、変更済マニフェスト名702はWebブラウザ201に制御文にしたがって書き換えられたマニフェストを示している。まず、Webブラウザ201は、サーバから提供されるオリジナルのマニフェストをオリジナルマニフェスト名701で示すマニフェスト(以下マニフェスト701と呼ぶ)として保存する。次に、Webブラウザ201は、このオリジナルのマニフェスト701に記述された制御文にしたがってマニフェスト701を書き換え、変更済マニフェスト名702で示すマニフェスト(以下、マニフェスト702あるいは変更済マニフェストファイルと呼ぶ)として保存する。そして、Webブラウザ201は、書き換えたマニフェスト702にしたがってアプリケーションキャッシュにファイルをキャッシュする。例えば、Webブラウザ201は、制御文601で一致した条件により703のように代替ファイルをキャッシュし、制御文602で一致した条件により704のようにファイルをキャッシュしないようにする。
<Example of application cache>
FIG. 7 is a diagram illustrating an example of the contents of the application cache. The original manifest name 701 indicates the original manifest before being rewritten to the Web browser 201, and the changed manifest name 702 indicates the manifest rewritten to the Web browser 201 according to the control statement. First, the Web browser 201 stores an original manifest provided from the server as a manifest (hereinafter referred to as a manifest 701) indicated by an original manifest name 701. Next, the Web browser 201 rewrites the manifest 701 in accordance with the control statement described in the original manifest 701 and saves it as a manifest indicated by the changed manifest name 702 (hereinafter referred to as a manifest 702 or a changed manifest file). . Then, the Web browser 201 caches the file in the application cache according to the rewritten manifest 702. For example, the Web browser 201 caches the substitute file as in 703 based on the condition matched in the control statement 601 and does not cache the file as in 704 according to the condition matched in the control statement 602.

なお、キャッシュを更新することを考慮して、Webブラウザ201は、オリジナルのマニフェスト701を保持しておく。Webブラウザ201によるキャッシュの更新方法は後述する。   In consideration of updating the cache, the Web browser 201 holds the original manifest 701. A cache updating method by the Web browser 201 will be described later.

<キャッシュ手順>
図8は、アプリケーションキャッシュへのキャッシュ手順例を示すフローチャートである。本処理は、アプリケーションキャッシュ機能を有し、格納制御手段として機能するWebブラウザ201が、Webサイトへアクセスしたときのアプリケーションキャッシュに関する処理である。したがって図8の手順は、ソフトウェア上はWebブラウザ201が、ハードウェア上はCPU301が主体となって実行する。
<Cash procedure>
FIG. 8 is a flowchart illustrating an example of a procedure for caching the application cache. This process is a process related to the application cache when the Web browser 201 having an application cache function and functioning as a storage control unit accesses the Web site. Therefore, the procedure of FIG. 8 is executed mainly by the Web browser 201 on software and the CPU 301 on hardware.

Webブラウザ201でWebサイト(すなわち指定したURI)にアクセスすると、S801でアプリケーションキャッシュに当該Webサイトの最新のキャッシュが存在するかどうかを判定する。この判定は、Webブラウザ201が、Webサイトに配置されているマニフェストをダウンロードして、WebサイトからダウンロードしたマニフェストとWebブラウザ201が保持しているオリジナルのマニフェスト701とを比較することで行う。例えばこれらマニフェストの内容に相違があればWebサイトに配置された(すなわちダウンロードした)マニフェストが最新であり、最新ではないマニフェストに基づいたアプリケーションキャッシュは最新ではないと判断する。アプリケーションキャッシュが最新でなかった場合や、そもそもアプリケーションキャッシュにキャッシュデータがなにも保存されていない場合はS808へ進む。一方、アプリケーションキャッシュが最新である場合、すなわちダウンロードしたマニフェストとWebブラウザ201が保持していたマニフェスト701とが一致した場合は、S802へ進む。Webブラウザ201がオフライン状態の場合は、Webサイトにアクセスすることができないため、Webブラウザ201が保持しているマニフェスト701を最新のものと判断し、S802へ進む。   When the Web browser 201 accesses the Web site (that is, the designated URI), in S801, it is determined whether or not the latest cache of the Web site exists in the application cache. This determination is performed by the Web browser 201 downloading the manifest arranged on the Web site and comparing the manifest downloaded from the Web site with the original manifest 701 held by the Web browser 201. For example, if there is a difference in the contents of these manifests, it is determined that the manifest placed on the website (that is, downloaded) is the latest, and the application cache based on the manifest that is not the latest is not the latest. If the application cache is not up-to-date, or if no cache data is stored in the application cache, the process proceeds to S808. On the other hand, if the application cache is the latest, that is, if the downloaded manifest matches the manifest 701 held by the Web browser 201, the process proceeds to S802. When the Web browser 201 is offline, the Web site cannot be accessed, so the manifest 701 held by the Web browser 201 is determined to be the latest, and the process proceeds to S802.

S802〜S806では、アプリケーションキャッシュからキャッシュしていたファイルをロードする。マニフェストに記述されたファイルのうち、アプリケーションキャッシュからロードが未完了のファイルに対してS802〜S806の処理を繰り返す。   In S802 to S806, the cached file is loaded from the application cache. Of the files described in the manifest, the processes in S802 to S806 are repeated for files that have not been loaded from the application cache.

続いてS803で、Webブラウザ201は、Webブラウザ201が保持するマニフェストに記述されたファイルをアプリケーションキャッシュあるいはネットワーク越しに参照できるか試みる。参照できる場合はS804へ進み、参照できない場合はS805へ進む。   In step S <b> 803, the web browser 201 tries to refer to the file described in the manifest held by the web browser 201 via the application cache or the network. If it can be referred, the process proceeds to S804, and if it cannot be referred, the process proceeds to S805.

S804では、Webブラウザ201はマニフェストのCACHEヘッダに記述されたファイルであればアプリケーションキャッシュから、NETWORKヘッダに記述されたファイルであればネットワーク越しにファイルをロードする。   In step S804, the Web browser 201 loads the file from the application cache if the file is described in the CACHE header of the manifest, and loads the file over the network if the file is described in the NETWORK header.

S805では、Webブラウザ201は参照できなかったファイルの代わりにFALLBACKヘッダに記述されたファイルをロードする。   In step S805, the Web browser 201 loads a file described in the FALLBACK header instead of the file that could not be referred to.

続いてS806で、Webブラウザ201はマニフェストに記述された全てのファイルに対してS804あるいはS805の処理が行われたかどうか判断する。処理が行われていないファイルが存在すると判断すれば、S802に戻り処理を繰り返す。一方、Webブラウザ201がマニフェストに記述された全てのファイルに対して処理が行われたと判断すれば、S807に進む。   In step S806, the web browser 201 determines whether the processing in step S804 or S805 has been performed on all files described in the manifest. If it is determined that there is an unprocessed file, the process returns to S802 and the process is repeated. On the other hand, if the Web browser 201 determines that all files described in the manifest have been processed, the process proceeds to S807.

続いてS807では、Webブラウザ201が、アプリケーションキャッシュからロードしたファイルを、UI202を介してモニタ311に表示することで、Webサイトの利用を可能にする。   In step S807, the web browser 201 displays the file loaded from the application cache on the monitor 311 via the UI 202, thereby enabling the use of the website.

S808では、Webブラウザ201はWebブラウザ201のネットワーク状態を確認し、オンラインであれば、キャッシュするファイルのダウンロード処理(S809)に進む。一方、オフラインであれば、キャッシュするファイルのダウンロードもWebサイトの表示もできないため、Webサイトへのアクセスは失敗する。   In step S808, the web browser 201 confirms the network state of the web browser 201. If the web browser 201 is online, the process proceeds to a file download process (S809) to be cached. On the other hand, if it is offline, the file to be cached cannot be downloaded and the website cannot be displayed, so access to the website fails.

図9は、図8におけるキャッシュするファイルのダウンロード時の処理(S809)の手順例を示すフローチャートである。本処理は、Webブラウザ201が、オリジナルのマニフェストに記述された制御文、特にその条件と、ユーザエージェント等に含まれたパラメータにしたがってマニフェストを書き換え(すなわち編集し)、書き換えた後に作成されるマニフェストにしたがってファイルをキャッシュする処理である。すなわち、マニフェストファイルの解析した結果、そこに含まれた制御文と環境情報などの条件とに従ってキャッシュするデータを決定し、マニフェストを書き換える。   FIG. 9 is a flowchart showing a procedure example of the process (S809) when downloading the file to be cached in FIG. In this processing, the Web browser 201 rewrites (that is, edits) the manifest according to the control statement described in the original manifest, particularly the conditions and parameters included in the user agent, and the manifest created after the rewrite. The process of caching the file according to That is, as a result of analyzing the manifest file, data to be cached is determined according to the control statement included therein and conditions such as environment information, and the manifest is rewritten.

キャッシュするファイルのダウンロード処理が開始されると、Webブラウザ201はS901で、Webサイトからダウンロードした最新のマニフェスト(対象マニフェストと呼ぶ)を解析する。   When the download process of the file to be cached is started, the Web browser 201 analyzes the latest manifest downloaded from the Web site (referred to as a target manifest) in S901.

続いてS902で、Webブラウザ201は対象マニフェストの解析が正常に終了したかどうかの判断をする。Webブラウザ201がコメントアウト行の構文を解釈できなかった場合は、そのコメントアウト行のみ制御文ではなく、通常のコメントアウト行として扱う。正常に終了するとS903に進む。一方、対象マニフェストのコメントアウト行以外の箇所での構文の誤りや、存在しないファイルを指定しているなど、解析が正常に終了しなかった場合は、キャッシュするファイルのダウンロード処理を終了する。この場合、S807に進むが、キャッシュはされずWebサイトが表示されるだけである。   In step S902, the Web browser 201 determines whether the analysis of the target manifest has been completed normally. When the Web browser 201 cannot interpret the syntax of the commented-out line, only the commented-out line is handled as a normal commented-out line, not a control statement. If completed normally, the process proceeds to S903. On the other hand, if the analysis does not end normally, such as a syntax error in a part other than the commented-out line of the target manifest, or a file that does not exist is specified, the download process of the cached file ends. In this case, the process proceeds to S807, but only the website is displayed without being cached.

S903では、Webブラウザ201が対象マニフェストのコメントアウト行に、図6に例示したようなWebブラウザ201が解釈できる制御文が記述されていたかどうかの判断を行う。記述されていれば、S904に進む。一方、記述されていなければ、S905に進む。   In step S903, the Web browser 201 determines whether a control statement that can be interpreted by the Web browser 201 illustrated in FIG. 6 is described in the comment-out line of the target manifest. If it is described, the process proceeds to S904. On the other hand, if not described, the process proceeds to S905.

S904では、Webブラウザ201は対象マニフェストに記述された制御文にしたがってマニフェストの書き換えを行う。ユーザが使用している端末が「PC」で、且つ、使用しているWebブラウザ201が「browserB」の場合のマニフェストの書き換え前後の例は、図6の通りである。対象マニフェストに制御文が記述されているが1つも条件に当てはまらなかった場合、Webブラウザ201は、書き換え処理を行う必要はないが、書き換えたマニフェストを変更済マニフェストとして保存しておく。なお条件判定に用いるブラウザ名等のステータス情報は例えばオペレーティングシステム等により提供される。   In step S904, the Web browser 201 rewrites the manifest according to the control statement described in the target manifest. An example before and after rewriting the manifest when the terminal used by the user is “PC” and the Web browser 201 being used is “browser B” is as shown in FIG. If a control statement is described in the target manifest but none of the conditions are met, the Web browser 201 does not need to perform a rewrite process, but saves the rewritten manifest as a modified manifest. Note that status information such as a browser name used for condition determination is provided by, for example, an operating system.

続いてS905で、Webブラウザ201は、書き換えた変更済マニフェストにしたがって、アプリケーションキャッシュに変更済マニフェストで指定されているファイルをダウンロードする。同時に、オリジナルである対象マニフェストを、オリジナルのマニフェスト701としてアプリケーションキャッシュに保存する。S904にてWebブラウザ201が、マニフェストを書き換えた場合は、書き換えた後の変更済マニフェストもマニフェスト702としてアプリケーションキャッシュに保存する。なおステップS905におけるファイルのダウンロードは、上述したように、Webブラウザが生成したユーザエージェントにより実行してもよい。   In step S905, the Web browser 201 downloads the file specified by the changed manifest to the application cache according to the rewritten changed manifest. At the same time, the original target manifest is stored in the application cache as the original manifest 701. When the Web browser 201 rewrites the manifest in S904, the modified manifest after rewriting is also saved in the application cache as the manifest 702. Note that the file download in step S905 may be executed by the user agent generated by the Web browser as described above.

なお、本実施例ではWebブラウザ201が、オリジナルであるマニフェスト701を書き換えることで、代替ファイルをキャッシュするような例を説明した。しかし、Webブラウザ201がマニフェストを書き換えずとも、同様のキャッシュ制御を行う方法もある。例えば、Webブラウザ201が、HTMLなどに記述したソースファイルのパスの整合性を取るために、単に代替ファイルをリネームしてからキャッシュする方法が考えられる。また、同様の理由で、代替前のファイル名から代替ファイルを辿るためのリンクを作成してからキャッシュする方法も考えられる。したがって、キャッシュ制御のための手順は、本実施例で述べた手順例に限らない。   In the present embodiment, an example has been described in which the Web browser 201 caches an alternative file by rewriting the original manifest 701. However, there is a method in which the Web browser 201 performs similar cache control without rewriting the manifest. For example, in order for the Web browser 201 to maintain the consistency of the path of the source file described in HTML or the like, a method of simply renaming an alternative file and caching it can be considered. For the same reason, a method of caching after creating a link for tracing the substitute file from the file name before substitution can be considered. Therefore, the procedure for cache control is not limited to the procedure example described in this embodiment.

以上の構成及び手順により、本実施形態によれば、キャッシュ対象のファイルを、条件付きで指定することができる。本実施形態では特に、Webブラウザや装置などの実行環境に関する条件に該当するキャッシュ対象のファイルと、無条件のファイルとを指定できる。このため、不要なファイルあるいは、Webブラウザの機能によっては使用できない不適切なファイルのキャッシュを回避できる。
[実施例2]
実施例1では、端末やWebブラウザに応じてキャッシュ制御を行うための処理手順を説明した。実施例1で説明したWebブラウザ201が制御文に従って判断する条件は主に端末・Webブラウザの種類などの環境であったが、ユーザ自身の情報や利用形態については考慮できていない。そこで、実施例2ではWebサイトが許可する範囲内でユーザの意図を反映したキャッシュ制御を実現する手法について説明する。以下、Webサイトが、Webブラウザ201にファイルをキャッシュさせる際のユーザの意図の反映であるポリシー設定情報を便宜的にキャッシュポリシと呼ぶことにする。
With the configuration and procedure described above, according to the present embodiment, a file to be cached can be specified conditionally. In this embodiment, in particular, it is possible to specify a file to be cached corresponding to a condition relating to an execution environment such as a Web browser or an apparatus, and an unconditional file. Therefore, it is possible to avoid caching unnecessary files or inappropriate files that cannot be used depending on the function of the Web browser.
[Example 2]
In the first embodiment, the processing procedure for performing cache control according to a terminal or a Web browser has been described. The condition that the Web browser 201 described in the first embodiment determines according to the control statement is mainly the environment such as the type of the terminal / Web browser, but the user's own information and usage form cannot be considered. Therefore, in the second embodiment, a method for realizing cache control reflecting the user's intention within the range permitted by the website will be described. Hereinafter, the policy setting information that reflects the intention of the user when the Web site causes the Web browser 201 to cache the file is referred to as a cache policy for convenience.

図10は、キャッシュポリシによるキャッシュ制御のための設定画面の一例を示す図である。本設定画面では、Webブラウザ201でキャッシュポリシによるキャッシュ制御を行うための設定ができる。設定画面はWebブラウザ201から呼び出す。   FIG. 10 is a diagram illustrating an example of a setting screen for cache control based on a cache policy. On this setting screen, the Web browser 201 can be set to perform cache control using a cache policy. The setting screen is called from the Web browser 201.

ラジオボタン1001、1002は、Webサイトがキャッシュポリシに対応していた場合、キャッシュポリシを適用するか否かを設定するためのラジオボタンである。設定画面で、ラジオボタン1001が選択された場合は、URLリスト1003とキャッシュポリシの設定項目リスト1006が設定できるようになり、それらの設定に応じてキャッシュ制御が実行される。   Radio buttons 1001 and 1002 are radio buttons for setting whether or not to apply a cache policy when the Web site supports the cache policy. When the radio button 1001 is selected on the setting screen, the URL list 1003 and the cache policy setting item list 1006 can be set, and cache control is executed according to these settings.

URLリスト1003はキャッシュポリシを適用しないWebサイトのリストである。ユーザがラジオボタン1001によりキャッシュポリシを適用していたとしても、URLリスト1003に登録されているWebサイトにはキャッシュポリシを適用しない。ボタン1004によりURLリスト1003からWebサイトを削除することができ、ボタン1005によりURLを追加することが可能である。   The URL list 1003 is a list of websites to which the cache policy is not applied. Even if the user applies the cache policy by using the radio button 1001, the cache policy is not applied to the Web site registered in the URL list 1003. A Web site can be deleted from the URL list 1003 using a button 1004, and a URL can be added using a button 1005.

設定項目リスト1006はキャッシュポリシのリストである。キャッシュポリシによるキャッシュ制御は、これら設定項目の設定値に当てはまる条件で、且つ、Webサイトがキャッシュポリシに対応している場合に適用される。   The setting item list 1006 is a cache policy list. The cache control based on the cache policy is applied in a condition that applies to the setting values of these setting items and when the Web site supports the cache policy.

OKボタン1007を押下すると、前回の設定値の保存処理から変更された設定値を保存すると共に、本設定画面を閉じる。キャンセルボタン1008を押下すると、前回の設定値の保存処理から変更された設定値を破棄すると共に、本設定画面を閉じる。適用ボタン1009を押下すると、前回の設定値の保存処理から変更された設定値を保存する。   When an OK button 1007 is pressed, the setting value changed from the previous setting value saving process is saved and the setting screen is closed. When a cancel button 1008 is pressed, the setting value changed from the previous setting value saving process is discarded and the setting screen is closed. When an apply button 1009 is pressed, the setting value changed from the previous setting value saving process is saved.

なお、実施例1で説明した、Webブラウザ201が生成するユーザエージェントなどに応じてキャッシュ制御を行うための設定、例えばブラウザ名やデバイス種類等も、本設定画面が提供する設定項目に含めることができる。また、設定項目リスト1006は、キャッシュポリシのほんの一例であり、拡張することができる。   Note that the settings described in the first embodiment for performing cache control according to the user agent generated by the Web browser 201, such as the browser name and device type, may also be included in the setting items provided on this setting screen. it can. The setting item list 1006 is just an example of a cache policy and can be expanded.

図11は、キャッシュポリシによるキャッシュ制御のためのマニフェストの記述例を示す図である。マニフェストのコメントアウト行に制御文を記述する方法は、実施例1と同様である。また、実施例2においても、図8、図9のフローチャートと同様の処理手順が適用される。そのため、実施例2においても、Webブラウザ201は、S904でキャッシュポリシを適用したマニフェスト701の書き換えを行い、S905で書き換えたマニフェスト702にしたがってファイルをダウンロードする。本実施例においても、実施例1と同様、制御文で使用する項目名は、対応する情報と関連付けられており、制御文に記述された項目名にしたがって関連付けられた情報が参照される。本例では、項目名と対応する情報との関連付けは、ユーザエージェントに含まれた設定から、さらにキャッシュポリシで定義される設定まで拡張されている。たとえば項目名"image"が制御文に表れれば、対応する情報として、キャッシュポリシ設定画面において「サイズの小さい画像ファイルをキャッシュする」という項目で設定された情報を参照する。   FIG. 11 is a diagram illustrating a description example of a manifest for cache control based on a cache policy. The method for describing the control statement in the commented-out line of the manifest is the same as in the first embodiment. In the second embodiment, the same processing procedure as that in the flowcharts of FIGS. 8 and 9 is applied. Therefore, also in the second embodiment, the Web browser 201 rewrites the manifest 701 to which the cache policy is applied in S904, and downloads the file according to the manifest 702 rewritten in S905. Also in the present embodiment, as in the first embodiment, the item name used in the control statement is associated with the corresponding information, and the associated information is referred to according to the item name described in the control statement. In this example, the association between the item name and the corresponding information is extended from the setting included in the user agent to the setting defined by the cache policy. For example, if the item name “image” appears in the control statement, the information set in the item “cache image file having a small size” on the cache policy setting screen is referred to as the corresponding information.

ここで、Webブラウザ201を使用して、図11のマニフェストに従って、図10のような設定を行った場合のキャッシュ制御について説明する。まず、Webブラウザ201は、制御文1102を読むと、条件として記述された項目名"image"に対応する情報である設定項目1010により設定された情報(以下単に設定項目と呼ぶ。)を参照し、条件が一致すると、すなわち参照した情報が、条件値"small"と一致すると判断した場合、通常のフォントサイズであるstyle.cssの代わりに同じディレクトリに置かれたフォントサイズの大きいstyle_large.cssをキャッシュする。なお、設定項目1012がチェックされると、その項目の情報として値"small"がセットされるものとする。以下、制御文ごとに同様の判断を行うが、判断の詳細については省略して説明する。   Here, the cache control when the setting as shown in FIG. 10 is performed according to the manifest of FIG. 11 using the Web browser 201 will be described. First, when the Web browser 201 reads the control statement 1102, the Web browser 201 refers to information (hereinafter simply referred to as a setting item) set by a setting item 1010 that is information corresponding to the item name “image” described as a condition. When the conditions are matched, that is, when it is determined that the referred information matches the condition value “small”, the standard font size style. style_large. with a large font size placed in the same directory instead of css. Cache css. When the setting item 1012 is checked, a value “small” is set as information of the item. Hereinafter, the same determination is performed for each control statement, but details of the determination will be omitted.

次に、Webブラウザ201は、設定項目1011と制御文1103の条件が一致すると判断し、年齢制限コンテンツであるadvの代わりにコンテンツadv_U18をネットワークからロードするようにする。最後に、Webブラウザ201は、設定項目1012と制御文1101の条件が一致すると判断し、image.jpgの代わりに小さいサイズの画像ファイルimage_small.jpgをキャッシュする。Webブラウザ201は、設定項目1013を適用しているが、図11に記載されている制御文に該当する条件がないため、適用しない。この例では、マニフェストを書き換えずに、制御文を解釈実行してキャッシュするように説明したが、実施例1のようにマニフェストを書き換えてから変更後マニフェストを解釈実行してもよい。
図10に示したように、ポリシー設定情報には、フォントサイズ、オブジェクト配置を前記情報処理端末に合わせる設定、赤みを抑える設定、年齢制限、画像ファイルをキャッシュしない設定、サイズの小さい画像ファイルをキャッシュする設定、音声ファイルをキャッシュしない設定、サイズの小さい音声ファイルをキャッシュする設定、映像ファイルをキャッシュしない設定などが含まれている。
Next, the Web browser 201 determines that the conditions of the setting item 1011 and the control statement 1103 match, and loads the content adv_U18 from the network instead of adv that is age-restricted content. Finally, the Web browser 201 determines that the conditions of the setting item 1012 and the control statement 1101 match, and image. Instead of jpg, a small image file image_small. Cache jpg. The Web browser 201 applies the setting item 1013, but does not apply it because there is no condition corresponding to the control statement described in FIG. In this example, the control statement is interpreted and executed and cached without rewriting the manifest. However, the changed manifest may be interpreted and executed after rewriting the manifest as in the first embodiment.
As shown in FIG. 10, the policy setting information includes a font size, a setting to match the object arrangement with the information processing terminal, a setting to suppress redness, an age limit, a setting not to cache an image file, and a cache for a small image file. Settings for caching audio files, settings for caching small audio files, settings for not caching video files, and the like.

図12は、Webブラウザ201を使用してキャッシュポリシに対応しているWebサイトに初めてアクセスし、キャッシュポリシを適用したファイルのダウンロード処理が終了したときの通知画面例である。   FIG. 12 shows an example of a notification screen when the Web browser 201 is used for the first time to access a Web site that supports the cache policy, and the download processing of the file to which the cache policy is applied is completed.

メッセ―ジ表示部1201は、最新のキャッシュポリシを適用した際に表示されるため、二度目以降のアクセス(キャッシュからのロード)では表示されない。キャッシュポリシに変更があった場合は、Webブラウザ201は、書き換えたマニフェスト702を保有するWebサイトのオリジナルのマニフェスト701を参照し、再キャッシュを行う。この場合も、S904でキャッシュポリシを適用したマニフェスト701の書き換えを行い、S905で書き換えたマニフェスト702にしたがってファイルをダウンロードする。     Since the message display unit 1201 is displayed when the latest cache policy is applied, it is not displayed for the second and subsequent accesses (loading from the cache). When there is a change in the cache policy, the Web browser 201 refers to the original manifest 701 of the Web site that holds the rewritten manifest 702 and performs re-cache. Also in this case, the manifest 701 to which the cache policy is applied is rewritten in S904, and the file is downloaded according to the manifest 702 rewritten in S905.

ボタン1202は、当該Webサイトのキャッシュの際に、Webブラウザ201が、その時点で適用されているキャッシュポリシの設定でキャッシュを行うか否かの確認のためのボタンである。ボタン1202を押下することで、Webブラウザ201は、その時点で適用されているキャッシュポリシで当該Webサイトのキャッシュを行うことを確定する。   A button 1202 is a button for confirming whether or not the Web browser 201 performs caching according to the cache policy setting applied at that time when the Web site is cached. When the button 1202 is pressed, the Web browser 201 determines to cache the Web site with the cache policy applied at that time.

ボタン1203は、初めて参照するマニフェストに対して、その時点でのキャッシュポリシを適用したくない場合に、キャッシュポリシの変更を行うためのボタンである。ボタン1203を押下すると、図10の設定画面が開き、再設定を行うことができる。図10で再設定を行い、設定値を保存してから設定画面を閉じると、Webブラウザ201は、再度キャッシュを行う。なお、メッセージ表示部1201、ボタン1202、ボタン1203は表示しないことも可能である。   A button 1203 is a button for changing the cache policy when it is not desired to apply the cache policy at that time to the manifest referred to for the first time. When a button 1203 is pressed, the setting screen shown in FIG. 10 is opened and resetting can be performed. When resetting is performed in FIG. 10 and the setting screen is closed after saving the setting value, the Web browser 201 performs caching again. Note that the message display unit 1201, the button 1202, and the button 1203 may not be displayed.

通常、Webサイトにアクセスすると、キャッシュを行うと共にWebサイトを表示するため、初回アクセス時はアプリケーションキャッシュからロードを行わない場合が多い。しかし、キャッシュポリシが適用されるのは、あくまでキャッシュからロードしたファイルであるため、初回アクセス時はキャッシュポリシの適用されていないWebサイトが表示される可能性がある。そこで、本設定画面で所定の設定を行うことで、初回アクセス時でもキャッシュからロードするように設定することも可能である。また、ユーザの希望に応じて、管理者しかキャッシュポリシの設定が行えないようにすることも可能である。   Normally, when accessing a Web site, the cache is displayed and the Web site is displayed. Therefore, loading from the application cache is often not performed at the first access. However, since the cache policy is applied only to a file loaded from the cache, a Web site to which the cache policy is not applied may be displayed at the first access. Therefore, by performing a predetermined setting on this setting screen, it is also possible to set to load from the cache even at the first access. It is also possible to allow only the administrator to set the cache policy according to the user's wishes.

また実施例1では、Webブラウザがキャッシュしているマニフェストファイルと、Webサイトがあるマニフェストファイルとが相違していればアプリケーションキャッシュは最新ではないものと判断したが、本例ではそれに加えて、更新されたキャッシュポリシが適用されるWebサイトにアクセスした場合に、アプリケーションキャッシュは最新ではないと判断してもよい。更新されたキャッシュポリシが適用されたか否かはWebサイトごとに異なるため、例えばWebサイトごとに、適用したキャッシュポリシのバージョンや更新日時等を記録しておき、当該Webサイトにアクセスした際に、記録したキャッシュポリシと現在のキャッシュポリシのバージョンや更新日時等を比較し、相違があればアプリケーションキャッシュは最新ではないと判断して、その更新手順を行ってもよい。   In the first embodiment, if the manifest file cached by the Web browser is different from the manifest file with the Web site, the application cache is determined to be out-of-date. When accessing a Web site to which the cache policy is applied, it may be determined that the application cache is not up-to-date. Since whether or not the updated cache policy is applied differs for each website, for example, for each website, the version of the applied cache policy, the update date and time, etc. are recorded, and when accessing the website, The recorded cache policy may be compared with the current cache policy version, update date and time, and if there is a difference, it may be determined that the application cache is not the latest and the update procedure may be performed.

以上のようにして本実施形態によれば、ユーザが設定可能なキャッシュポリシの設定を条件として、当該条件に応じたファイルをキャッシュすることができる。このため、環境に応じて不要なデータや不適切なデータのキャッシュを防止するのみならず、ユーザの意思を反映したデータのキャッシュが可能となる。   As described above, according to the present embodiment, it is possible to cache a file according to a condition that is set by a cache policy that can be set by the user. For this reason, it is possible not only to prevent unnecessary and inappropriate data from being cached depending on the environment, but also to cache data reflecting the user's intention.

[その他の実施例]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Examples]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

104 情報処理端末、107 情報処理端末、201 Webブラウザ、207 データストレージ 104 Information processing terminal, 107 Information processing terminal, 201 Web browser, 207 Data storage

Claims (13)

ウェブブラウザが動作する情報処理端末であって、
前記ウェブブラウザによりアクセスしたウェブサイトが提供するマニフェストファイルを解析する解析手段と、
前記マニフェストファイルに従って前記ウェブブラウザのための保存領域へデータをキャッシュデータとして格納する格納制御手段と
を有し、
前記格納制御手段は、前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかに基づき、前記解析手段による前記マニフェストファイルの解析の結果に従って、前記キャッシュデータとして格納すべきデータを決定することを特徴とする情報処理端末。
An information processing terminal on which a web browser operates,
Analyzing means for analyzing a manifest file provided by a website accessed by the web browser;
Storage control means for storing data as cache data in a storage area for the web browser according to the manifest file;
The storage control unit is configured to store data to be stored as the cache data according to a result of analysis of the manifest file by the analysis unit based on at least one of environment information of the information processing terminal and policy setting information of the web browser. An information processing terminal characterized by deciding.
前記格納制御手段は、オリジナルのマニフェストファイルを、前記情報処理端末の環境情報および前記ウェブブラウザのポリシー設定の少なくとも何れかに基づき、前記解析手段による解析の結果に従って編集して変更済マニフェストファイルを作成し、前記変更済マニフェストファイルを前記キャッシュデータとして格納することを特徴とする請求項1に記載の情報処理端末。   The storage control means creates an altered manifest file by editing the original manifest file according to the result of analysis by the analysis means based on at least one of the environment information of the information processing terminal and the policy setting of the web browser The information processing terminal according to claim 1, wherein the changed manifest file is stored as the cache data. 前記格納制御手段は、前記変更済マニフェストファイルに従って前記ウェブブラウザのための保存領域へキャッシュデータを格納することを特徴とする請求項2に記載の情報処理端末。   The information processing terminal according to claim 2, wherein the storage control unit stores cache data in a storage area for the web browser according to the changed manifest file. 前記解析手段は、オリジナルのマニフェストファイルの中のコメント行として記載される条件を解析して、前記格納制御手段は、前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかに基づき、前記条件に従い、前記キャッシュデータとして格納すべきデータを決定することを特徴とする請求項1に記載の情報処理端末。   The analysis unit analyzes a condition described as a comment line in the original manifest file, and the storage control unit stores at least one of environment information of the information processing terminal and policy setting information of the web browser. The information processing terminal according to claim 1, wherein data to be stored as the cache data is determined based on the condition. 前記環境情報には情報処理端末の種類、ウェブブラウザの種類の少なくとも何れかが含まれることを特徴とする請求項1乃至4のいずれか一項に記載の情報処理端末。   The information processing terminal according to any one of claims 1 to 4, wherein the environment information includes at least one of a type of an information processing terminal and a type of a web browser. 前記ポリシー設定情報には、フォントサイズ、オブジェクト配置を前記情報処理端末に合わせる設定、赤みを抑える設定、年齢制限、画像ファイルをキャッシュしない設定、サイズの小さい画像ファイルをキャッシュする設定、音声ファイルをキャッシュしない設定、サイズの小さい音声ファイルをキャッシュする設定、映像ファイルをキャッシュしない設定の少なくともいずれかが含まれることを特徴とする請求項1乃至5のいずれか一項に記載の情報処理端末。   The policy setting information includes a font size, a setting for matching an object arrangement with the information processing terminal, a setting for suppressing redness, an age limit, a setting for not caching an image file, a setting for caching a small image file, and a cache for an audio file. 6. The information processing terminal according to claim 1, wherein at least one of a setting not to perform, a setting to cache a small audio file, and a setting to not cache a video file is included. 前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかに基づく前記格納制御手段による制御が行われた場合に、前記ウェブブラウザを介して、当該制御が行われたことの通知を行うことを特徴する請求項1乃至6のいずれか一項に記載の情報処理端末。   When control by the storage control unit is performed based on at least one of environment information of the information processing terminal and policy setting information of the web browser, notification that the control has been performed via the web browser The information processing terminal according to any one of claims 1 to 6, wherein: 前記解析手段及び前記格納制御手段は、前記ウェブブラウザにより提供されることを特徴とする請求項1乃至7のいずれか一項に記載の情報処理端末。   The information processing terminal according to claim 1, wherein the analysis unit and the storage control unit are provided by the web browser. 前記ウェブブラウザによりアクセスしたウェブサイトが提供するマニフェストファイルを解析する解析手段と、
前記マニフェストファイルに従って前記ウェブブラウザのための保存領域へデータをキャッシュデータとして格納する格納制御手段と
してコンピュータを機能させるためのプログラムであって、
前記格納制御手段は、前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかに基づき、前記解析手段による前記マニフェストファイルの解析の結果に従って、前記キャッシュデータとして格納すべきデータを決定することを特徴とするプログラム。
Analyzing means for analyzing a manifest file provided by a website accessed by the web browser;
A program for causing a computer to function as storage control means for storing data as cache data in a storage area for the web browser according to the manifest file,
The storage control unit is configured to store data to be stored as the cache data according to a result of analysis of the manifest file by the analysis unit based on at least one of environment information of the information processing terminal and policy setting information of the web browser. A program characterized by deciding.
前記プログラムは、コンピュータをさらにウェブブラウザとして機能させるためのプログラムであることを特徴とする請求項9に記載のプログラム。   The program according to claim 9, wherein the program is a program for causing a computer to further function as a web browser. ウェブブラウザが動作する情報処理端末であって、
前記ウェブブラウザによりアクセスしたウェブサイトが提供する、前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかについて条件付きのデータの指定を含み得るマニフェストファイルを解析する解析手段と、
前記マニフェストファイルの解析の結果に従って、指定された条件に該当するデータを、前記ウェブブラウザのための保存領域へキャッシュデータとして格納する格納制御手段と
を有することを特徴とする情報処理端末。
An information processing terminal on which a web browser operates,
Analyzing means for analyzing a manifest file provided by the website accessed by the web browser, which may include specification of conditional data for at least one of the environment information of the information processing terminal and the policy setting information of the web browser;
An information processing terminal comprising storage control means for storing data corresponding to a specified condition as cache data in a storage area for the web browser according to a result of analysis of the manifest file.
ウェブブラウザが動作する情報処理端末におけるキャッシュ制御方法であって、
前記ウェブブラウザによりアクセスしたウェブサイトが提供するマニフェストファイルを解析する解析工程と、
前記マニフェストファイルに従って前記ウェブブラウザのための保存領域へデータをキャッシュデータとして格納する格納制御工程と
を有し、
前記格納制御工程では、前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかに基づき、前記解析工程による前記マニフェストファイルの解析の結果に従って、前記キャッシュデータとして格納すべきデータを決定することを特徴とするキャッシュ制御方法。
A cache control method in an information processing terminal on which a web browser operates,
An analysis step of analyzing a manifest file provided by a website accessed by the web browser;
A storage control step of storing data as cache data in a storage area for the web browser according to the manifest file,
In the storage control step, based on at least one of the environment information of the information processing terminal and the policy setting information of the web browser, the data to be stored as the cache data according to the result of the analysis of the manifest file by the analysis step A cache control method characterized by determining.
請求項1乃至8のいずれか一項に記載の情報処理端末と、
前記情報処理端末からのアクセスに応じて、前記情報処理端末の環境情報及び前記ウェブブラウザのポリシー設定情報の少なくとも何れかについて条件付きのデータの指定を含み得るマニフェストファイルを前記情報処理端末に提供するウェブサーバと
を有することを特徴とするウェブシステム。
An information processing terminal according to any one of claims 1 to 8,
In response to an access from the information processing terminal, a manifest file that can include specification of conditional data for at least one of environment information of the information processing terminal and policy setting information of the web browser is provided to the information processing terminal A web system comprising a web server.
JP2014116209A 2014-06-04 2014-06-04 Information processing terminal, cache control method, and web system Active JP6327959B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014116209A JP6327959B2 (en) 2014-06-04 2014-06-04 Information processing terminal, cache control method, and web system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014116209A JP6327959B2 (en) 2014-06-04 2014-06-04 Information processing terminal, cache control method, and web system

Publications (2)

Publication Number Publication Date
JP2015230564A JP2015230564A (en) 2015-12-21
JP6327959B2 true JP6327959B2 (en) 2018-05-23

Family

ID=54887310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014116209A Active JP6327959B2 (en) 2014-06-04 2014-06-04 Information processing terminal, cache control method, and web system

Country Status (1)

Country Link
JP (1) JP6327959B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018101240A (en) * 2016-12-20 2018-06-28 株式会社ミロク情報サービス Cache management program, cache management apparatus, cache management method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009187466A (en) * 2008-02-08 2009-08-20 Ntt Docomo Inc Proxy system and relay method
JP5022301B2 (en) * 2008-05-19 2012-09-12 株式会社エヌ・ティ・ティ・ドコモ Proxy server, communication relay program, and communication relay method
EP2388704A1 (en) * 2010-05-17 2011-11-23 Thomson Licensing Method of optimization of cache memory management and corresponding apparatus
JP5576781B2 (en) * 2010-12-16 2014-08-20 株式会社メガチップス Image processing system, image processing system operation method, host device, program, and program creation method
US9401917B2 (en) * 2011-06-03 2016-07-26 Blackberry Limited Pre-caching resources based on a cache manifest
JPWO2013042411A1 (en) * 2011-09-22 2015-03-26 Necソリューションイノベータ株式会社 Application management apparatus, application management method, and program

Also Published As

Publication number Publication date
JP2015230564A (en) 2015-12-21

Similar Documents

Publication Publication Date Title
US9503499B1 (en) Concealing latency in display of pages
US9565265B2 (en) Method and apparatus for automatically optimizing the loading of images in a cloud-based proxy service
US8732571B2 (en) Methods and systems for generating and displaying a preview image of a content area
US10120847B2 (en) Methods for transforming requests for web content and devices thereof
US20100070887A1 (en) Method and apparatus for providing an application canvas framework
US11677722B2 (en) Implementing a client-side policy on client-side logic
WO2013085595A1 (en) Selective image loading in mobile browsers
US8706778B2 (en) Methods and systems for an action-based interface for files and other assets
CN103617055A (en) Browser and method and device of starting applications in browser
CN113656005B (en) Application component library construction method, application component configuration method and related devices
JP6555860B2 (en) Information processing terminal, control method, and program
US20150312122A1 (en) Information processing terminal and control method
JP6327959B2 (en) Information processing terminal, cache control method, and web system
WO2015058614A1 (en) Bookmark storage method and device, and method and device for determining bookmark to be browsed
JP5393242B2 (en) Data providing method and intermediate server device
US10193950B2 (en) Network system and control method
JP6358049B2 (en) Local storage synchronization method, local storage synchronization apparatus, and local storage synchronization program
JPWO2013042411A1 (en) Application management apparatus, application management method, and program
JP6385157B2 (en) Information processing terminal, control method, and program
JP6344994B2 (en) Information processing terminal, control method, and program
WO2013088534A1 (en) Server and method for accessing portable terminal via network from client, and program allowing computer to function as said server
JP6131817B2 (en) Communication terminal, communication processing method, and communication processing program
US11630879B2 (en) Server and providing method
US11055068B1 (en) Proxying a target ECMAScript object regardless whether the target ECMAScript object is a read-only object
JP2013097474A (en) Communication terminal equipment and information display program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170519

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180312

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180319

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180417

R151 Written notification of patent or utility model registration

Ref document number: 6327959

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151