Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

URL Parameters Remembered??

Options
  • 18-02-2010 2:58pm
    #1
    Registered Users Posts: 1,262 ✭✭✭


    Edit: sorry for not including [Question] in the title!

    Hi all,

    I've a strange issue going on, on one of my sites.

    Basically, if you request a url with no language parameter, content in the default language is returned.

    If a url is requested with a langauge parameter, content in that language is returned.

    However, if I request a page with the language parameter, I get the content in that language fine. But if I then delete the language parameter from the url and hit refresh, the content is still being returned in the same language, whereas if no language parameter is specified, it should be in the default language.

    It's like the $HTTP_GET_VAR is being remembered somehow?

    Is this possible? Even if you delete parameters from a url and hit refresh, are they still "remembered" somehow?

    Thanks


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    Are you sure that the language variable isn't being stored in a cookie or session variable?

    Ordinarily if a visitor chose a language, you would want that language to persist, with or without the query parameter so you'd store it in an session or cookie.


  • Registered Users Posts: 1,825 ✭✭✭Gambler


    di11on wrote: »
    But if I then delete the language parameter from the url and hit refresh
    I know this is a silly question but do you hit refresh or enter? If you change the url but then hit the refresh button it will request the url including the language paramater..


  • Registered Users Posts: 1,262 ✭✭✭di11on


    seamus wrote: »
    Are you sure that the language variable isn't being stored in a cookie or session variable?

    Ordinarily if a visitor chose a language, you would want that language to persist, with or without the query parameter so you'd store it in an session or cookie.

    Problem with that is... SEO. I don't want it to be possible for content to be retrieved in different languages for the same URL.

    The system does remember the lagnuage and makes sure that every link on the site has the parameter appended.

    There is a specific check for non existant language paramater and if it's not found, language is set to default.


    I'm working from an old codebase... does $HTTP_GET_VARS contain cookie or session variables?


  • Registered Users Posts: 1,262 ✭✭✭di11on


    Gambler wrote: »
    I know this is a silly question but do you hit refresh or enter? If you change the url but then hit the refresh button it will request the url including the language paramater..

    Hi Gambler - I get the same behaviour hitting enter or refresh.


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    I've a feeling this is a coding problem...

    Any chance of snippet of code on what happens? The GET vars shouldn't be persistent unless specifically told.


  • Advertisement
  • Registered Users Posts: 1,262 ✭✭✭di11on


    I think I've identified the issue...

    If I register a session variable called 'language' and then call

    $HTTP_GET_VARS

    this will return the value of the session variable, even if there's no get parameter in the url... right?


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    I don't think so....sessions and http vars are separate


Advertisement