I need to check ETag from the header response of requesting URL. I know that when request URL, then response will be html, css, js and images.
My issue: How to read header for all these resources including the html when requesting URL?
HttpClient if you enter URL then it will give header and response only for html!! it didn't return the header for all loading resources which are involved with this URL and will be loaded associated with this URL.
if I request only css, then it will give me a right header response for this style.
HttpClient client = HttpClientBuilder.create().build(); HttpGet request = new HttpGet("http://www.mkyong.com/wp-content/themes/mkyong/css/prism.css"); HttpResponse response = client.execute(request); for (Header header : response.getHeaders("ETag")) System.out.println(header.getName()+" == "+header.getValue());
But if I tried to but the main URL: http://www.mkyong.com, then it will give me only response for the main html.
How to fetch them?