473,394 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Adding data to URL for bookmarking

My URL usually looks something like this (of course with much more
data)...

http://www.site.com/page.php?data=AAAGX

The data is mandatory.

If someone comes into this page like this (without the data)...

http://www.site.com/page.php

....then I check a cookie to see what the most recent data was and
proceed. If there's no cookie, I send them back to where they enter
the data.

This works just fine, except without the data visible in the URL, the
user can't copy, bookmark, email, etc. the URL (an important ability
to have in this case).

Can I tack the data onto the URL so it's visible in the browser
address bar without a page reload? Or will I have to force a page
reload?
Jun 27 '08 #1
3 1142
timothytoe wrote:
http://www.site.com/page.php?data=AAAGX
Please use example.com for example URIs.
If someone comes into this page like this (without the data)...
http://www.site.com/page.php
...then I check a cookie to see what the most recent data
This works just fine, except without the data visible in the URL, the
user can't copy, bookmark, email, etc. the URL (an important ability
to have in this case).

Can I tack the data onto the URL so it's visible in the browser
address bar without a page reload?
No.

.... but don't load the whole page. Test to see if it is set before
generating any content, if it isn't then redirect - and do it with the PHP
location header, not JavaScript.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Jun 27 '08 #2
David Dorward wrote:
then redirect - and do it with the PHP
location header, not JavaScript.
Obviously I mean the HTTP location header and the PHP header function.
--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Jun 27 '08 #3
On Apr 14, 11:39 am, David Dorward <dorw...@yahoo.comwrote:
David Dorward wrote:
then redirect - and do it with the PHP
location header, not JavaScript.

Obviously I mean the HTTP location header and the PHP header function.

--
David Dorwardhttp://dorward.me.uk/http://blog.dorward.me.uk/
Thanks.
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Simon Willison | last post by:
Hi all, I've been experimenting with Python CGIs, and more recently mod_python. The FieldStorage class used by Python's cgi module and mod_python's utility library allows form data sent by a...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
3
by: vMike | last post by:
Is there a way to adjust the url of the bookmark value when someone wants to bookmark a page. When a user tries to bookmark a page they get the non-postback state of the page. I can use code to...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
2
by: chazmanian | last post by:
We have some link buttons that allow the user to "view" a PDF file. That is, the link runs server-side code that generates the virtual path to the PDF file in question and then does a...
3
by: Grumps | last post by:
Im trying to build a bookmarking feature with ajax and everything has work until i come across the callback problem. document.getElementById during stateChanged Im trying to make possible...
0
rhitam30111985
by: rhitam30111985 | last post by:
hi there.. i am new to this network and also new to python programming.. i have been assigned the task to figure out how exactly social bookmarking is done but have no idea.. dunno where to start......
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.