• Resolved aberbenni

    (@aberbenni)


    How are redirection hits calculated?

    I tried to click on the same link (with redirect 302) several times from the browser but the count does not go up. If I use curl, the count is updated correctly.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author John Godley

    (@johnny5)

    They’re not calculated, it’s just how many times the URL is requested by WordPress. If you have a cache, or your browser is using it’s own cache, then it may not request the URL.

    Thread Starter aberbenni

    (@aberbenni)

    HTTP 302 shouldn’t be cached at all unless there’s also a Cache-Control or Expires header returned by the web server. According to RFC 2616, section 10.3.3 302 Found

    Headers are:

    X-Redirect-Agent: redirection
    Cache-Control: no-cache
    Pragma: no-cache

    No Expires header present.

    Is there any way to add explicits headers to redirects in your plugin?

    Plugin Author John Godley

    (@johnny5)

    The key word there is *should*, not *must*.

    You can add headers from the Site page.

    Thread Starter aberbenni

    (@aberbenni)

    I’m not sure what you mean by “You can add headers from the Site page“.

    The page containing the link is cached. Clicking on the href (redirection link) user is redirected to an external site.

    Here are the steps:

    1 Home page http://www.my-website.com/
    2 Redirection link http://www.my-website.com/redirect-to-whatever
    3 Destination http://www.destination-website.com

    Step 2 is cached by the browser and I cannot set heders there.

    On this stackoverflow discussion there is abit more info about *should* and *must*.

    Plugin Author John Godley

    (@johnny5)

    Sure, the difference between should and must is fine, but it’s not something the plugin need be concerned about.

    You can add headers from the Site page inside the Redirection plugin.

    Thread Starter aberbenni

    (@aberbenni)

    I’ll give it a try, thanks.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Redirection hits calculation info.’ is closed to new replies.