1

I'm trying to automate the website but the website is reading the cookies and after 5secs its redirect to the main page. (Just I assume, because I disable the cookies then refresh it, the website was not redirecting). I don't know how to set the cookies by using WWW::Mechanize.

Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
mkHun
  • 5,891
  • 8
  • 38
  • 85

1 Answers1

1

Here are answers to the questions you've asked, but I don't think they'll help you a lot. You really need to explain what you're trying to do, show your Perl code, and describe the behaviour that needs to be fixed

Cookies are data that a browser client stores on behalf of a server. They are indexed by URL

Every time a client sends an HTTP message, it checks to see whether it has cookie data for the URL. If so then the data is included in the header of the message sent

How to find if the website is reading cookies

The cookie information that a client sends is always read, but there is no way at all to tell whether the server has taken action according to that information, or just discarded it

the website is reading the cookies and after 5secs its redirect to the main page

I'm unclear how you think cookies might be relevant

Just to be clear:

  • A website is an accumulation of data files and executables on a server system, and so cannot "read" a cookie

  • It is the client—your browser—that redirects to the main page. That is most likely to be because the last message from the server included an instruction to load the main page after five seconds

Borodin
  • 126,100
  • 9
  • 70
  • 144