Exam 301b All QuestionsBrowse all questions from this exam
Question 28

Which iRule will instruct the client's browser to avoid caching HTML server responses?

    Correct Answer: C

    The iRule that will instruct the client's browser to avoid caching HTML server responses must modify the HTTP response headers and not the request headers. Therefore, the correct event to use is `HTTP_RESPONSE`. Additionally, it is important to check if the `Content-Type` contains 'html' to apply the cache control policy. Thus, the correct iRule is: when HTTP_RESPONSE { if {[HTTP::header Content-Type] contains "html"} { HTTP::header insert Pragma "no-cache" HTTP::header insert Expires "Fri, 01 Jan 1990 00:00:00 GMT" HTTP::header replace Cache-Control "no-cache,no-store,must-revalidate" } }.

Discussion
GVKDOption: C

C - Correct https://community.f5.com/discussions/technicalforum/force-no-cache-on-a-response-for-naughty-browsers/157583