Skip to content

关于响应头设置问题 #2

@tangyongshuang

Description

@tangyongshuang

大佬好,在为response设置响应头时,原代码:
response.addHeader("Pargam", "no-cache");

应该是单词拼写错误,正确的应该是:
response.addHeader("Pragma", "no-cache");

Pragma:no-cache是历史遗留字段,从HTTP/1.0开始向后兼容。该首部字段属于通用首部字段,但只用在客户端发送的请求中。客户端会要求所有的中间服务器不返回缓存的资源。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions