Welcome Guest, Not a member yet? Register   Sign In
loading issue after logout
#5

It will be the same on the host. You should always use absolute URLs for links and src attributes, using a function like base_url() or site_url() so the correct URL is generated for the current environment.

Something else you should consider is using redirect() with no arguments rather than '/', since the slash is likely the difference between before and after you logout. In other words, since you supplied a relative URL of '/images/1.jpg' and you probably started at 'http://www.example.com', your image would be found at 'http://www.example.com/images/1.jpg'. When you called redirect('/'), you probably ended up at 'http://www.example.com/', and it looks for your image at 'http://www.example.com//images/1.jpg'. Since it's fairly common for people to end up at 'http://www.example.com/', you don't want this to happen when people visit the page using this URL.

You can also set the base URL in your HTML to give yourself a fixed reference for relative URLs, regardless of the URL the user is currently viewing: http://www.w3.org/TR/html5/document-meta...se-element
Reply


Messages In This Thread
loading issue after logout - by ardavan - 10-12-2015, 09:01 PM
RE: loading issue after logout - by JayAdra - 10-12-2015, 10:06 PM
RE: loading issue after logout - by Baslugten - 10-12-2015, 10:46 PM
RE: loading issue after logout - by ardavan - 10-12-2015, 10:50 PM
RE: loading issue after logout - by mwhitney - 10-13-2015, 09:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB