user160820
user160820

Reputation: 15200

Setting header when user clicks on a link

I would like to ask whether it is possible to set request header when user clicks on a link?

Upvotes: 0

Views: 309

Answers (3)

Jerry Guo
Jerry Guo

Reputation: 1

Also it is use "get", u can use AJAX to get other content from another page then you can change the head request .

like use jQuery.

$.get({});
$.post({});

I don't know what u want to do with that?

Upvotes: 0

Pekka
Pekka

Reputation: 449395

No.

You would have to replace the link action by an Ajax request in order to set custom request headers.

Since version 1.5, jQuery.ajax() has the headers object for convenient access.

Upvotes: 1

Ciprian Mocanu
Ciprian Mocanu

Reputation: 2196

It is possible.. you link him to a page where you set the header and redirect him to the right page. :)

Or.. use javascript and hide the form and submit it on click :)

Upvotes: 0

Related Questions