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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

URL Parameters Remembered??

  • 18-02-2010 1:58pm
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


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


Advertisement