Examples of HintRecord


Examples of com.google.speedtracer.client.model.HintRecord

    responseBuilder.setResponseHeaderExpires("Tue, 08 Sep 1998 17:43:37 GMT");

    String hintDescription = "The following cacheable resources have a short"
        + " freshness lifetime. Specify an expiration at least one month"
        + " in the future for the following resources: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_WARNING);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    responseBuilder.setResponseHeaderContentType("image/png; charset=utf-8");

    String hintDescription = "The following cacheable resources have a short"
        + " freshness lifetime. Specify an expiration at least one month"
        + " in the future for the following resources: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_WARNING);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    responseBuilder.setResponseHeaderCacheControl("public, max-age=" + age);
    responseBuilder.setResponseHeaderContentType("image/png; charset=utf-8");

    String hintDescription = "To further improve cache hit rate, specify an expiration"
        + " one year in the future for the following cacheable resources: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_INFO);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    responseBuilder.setResponseHeaderDate("Fri, 01 Jan 2010 00:00:00 GMT");
    responseBuilder.setResponseHeaderExpires("Mon, 01 Mar 2010 00:00:00 GMT");

    String hintDescription = "To further improve cache hit rate, specify an expiration"
        + " one year in the future for the following cacheable resources: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_INFO);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    responseBuilder.setResponseHeaderCacheControl("private");
    responseBuilder.setResponseHeaderContentType(FAVICON_TYPE);

    String hintDescription = "Favicons should have an expiration at least one month"
        + " in the future: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_WARNING);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    responseBuilder.setResponseHeaderDate("Mon, 07 Sep 1998 17:43:37 GMT");
    responseBuilder.setResponseHeaderExpires("Mon, 14 Sep 1998 17:43:37 GMT");

    String hintDescription = "Favicons should have an expiration at least one month"
        + " in the future: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_WARNING);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    String url = "http://www.google.com/image.png?param=1";

    String hintDescription = "Resources with a '?' in the URL are not cached by most"
        + " proxy caching servers. Remove the query string and encode the"
        + " parameters into the URL for the following resources: " + url;
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_WARNING);
    runCacheTest(responseBuilder.getEvent(), url, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    // does fire a rule, but should not fire the query related rule since
    // a cookie is set
    String hintDescription = "The following publicly cacheable resources contain"
        + " a Set-Cookie header. This security vulnerability can cause cookies"
        + " to be shared by multiple users: " + url;
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_CRITICAL);

    runCacheTest(responseBuilder.getEvent(), url, expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    responseBuilder.setResponseHeaderContentType("image/png");
    responseBuilder.setResponseHeaderExpires(FUTURE_DATE);

    String hintDescription = "Consider adding a 'Cache-Control: public' header to the"
        + " following resource: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_INFO);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL,
        expectedHint);
  }
View Full Code Here

Examples of com.google.speedtracer.client.model.HintRecord

    String hintDescription = "Due to a bug, some proxy caching servers do not detect the presence"
      + " of the Content-Encoding response header. This can result in compressed"
      + " versions being delivered to client browsers that cannot properly"
      + " decompress the files. Therefore, use either 'Cache-Control: private'"
      + " or 'Vary: Accept-Encoding' for the following resource: http://www.google.com";
    HintRecord expectedHint = createHintRecord(hintDescription, HintRecord.SEVERITY_WARNING);

    runCacheTest(responseBuilder.getEvent(), DEFAULT_URL, expectedHint);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.