Removing header and footer when printing - printing

I need to remove the header and footer (date, page title, url) inserted by the browser when printing. I know it can be done on the client by configuring the browser, however this not an option. I know everyone says it is not possible.. But there must be a way to do this with javascript or some server side coding or something else? Does anyone know of any kind of solution?

I don't believe this is possible in almost any scenario. The information is added BY THE CLIENT. Thus if there is no way for you to configure your clients there is no way to remove the information.
My best advice would be to offer the information as a PDF rather than a page that the browser modifies.

Related

How can i make the parent url automatically update to a unique url when iframe loads particular content?

Okay, i'm extremely new to this sort of thing, so i am probably using incorrect terminology, but i've been trying to find an answer and can't, so i'm asking here!
I have a website made in Tumblr that opens post content inside an iframe. However, that means my parent url doesn't change according to the iframe content. Is there a way i can cause the parent url to change according to the post inside the iframe? On other sites i have just done this manually but it needs to happen automaically here.
Help! Thanks!
I think you could achieve this on a website using a trick to manually modify the address in the URL bar without reloading the page. See this question for more information. Unfortunately I am not familiar with how Tumblr works internally so I wouldn't be able to say if you can actually use this. But it seems like the only way to achieve what you want.

Prevent URL being stored to browser history

I need to open a popup window to a url with certain parameters. The parameters contain information that I would like to prevent from showing up in the browser history. The url points to a 3rd party site and I can't affect the way those parameters are transferred to them (can't use POST for example).
Currently I have worked around this so that I have a page on our server that loads the content of the third party page to an iframe and this seems to work.
However, I was wondering if there are any other ways of doing this and are they maybe somehow better or worse? Javascript or something? The negative side of this iframe thing is that it is not XHTML Strict compliant, which is something we are aiming for.
There are other similar questions here but I couldn't find a good answer.
Edit: Apparently this does not work as expected in IE. It might be that I still keep the solution for another reason, but it would be nice to know if there is a "bulletproof" solution.

Whether is it possible to indicate the printer to next page?

I am using php language. I project i have the application to be print, It contain two pages. According to the data available the page content may be change, so printout of first page end and second page starting content not to be proper.
So i want to know any other way is there, to separate the specific content to be printed from the second page ?
What you are looking for are the CSS page break properties. The w3schools.com site has usage guidelines for the commonly used page-break-after property.
I applied all the css method, but not get proper solution. I manually calculated and left the space for this depending on the condition. So i solve this problem with correct result.
Thanks for everyone those who guide and answer for this issue.

How can I display short URLs without file extention?

I've looked around but wasn't able to find what I was looking for. I'm looking for a way to automatically create short URLs displayed in the browser, not using a URL shortener. Basically I would like to re-create something like this:
idzr.org/1ptb
I upload screenshots to my server with "GrabUp" on a regular basis but it creates rather long URLs for example:
/2523e3c90d60f08e952215424e7c5d99.png
It's a bit annoying having to shorten them each time.
I have seen this method a lot lately with pretty much any file including html files. If this has been discussed already I'm sorry I'm posting it again. I just seem to be stuck.
Thanks in advance for any help & advice!
I don't know, what webserver do you use.
You write rule for rewrite
-- htaccess for Apache or equivalent for IIS
You push content to user thru your code, because browser doesn't know what content get from web server
-- use http header - MIME type

Why would I put ?src= in a link?

I feel dumb for not knowing this, but I see a lot of links in web pages and instead of this:
<a href="http://foo.com/">
...they use this:
<a href="http://foo.com/?src=bar.com">
Now I understand that the ?src= is telling something that this referral is coming from bar.com, but I don't understand why this needs to be called out explicitly. Can anyone shed some light on it for me? Is this something I need to include in my program generated links?
EDIT: Ok, sorry, I'm not being clear enough. I understand the GET syntax with a question mark and parameters separated by ampersands. I'm wondering what's this special src parameter? Why would one site link to another and tack an src parameter on the end even though there's no indication that the destination site uses this normally.
For example, on this page hover your mouse over the screenshot. The link URL is http://moms4mom.com/?src=stackexchangesites
But moms4mom.com is our site. Passing the src parameter does nothing, so why include it?
There are a few reasons that the src is being used explicitly. But in general, it is easier and more reliable to trust a query string to determine referer[sic] than it is to trust the referer, since the latter is often broken, deliberately or not. On the other hand, browsers almost never break the query string in a url, since this, unlike referers, is pretty important for pages to function. Besides, a referer is often done without any deliberate action on the part of the site doing the refering, which some users dislike.
The reason (I do it) is that popular analytics tools sometimes make it easier to filter on query strings than referrers.
There is no standard to the src parameter. Each site has its own and it's usually up to the site that gets the link to define how it wants to read it (as usually it's that site that's going to pay for the click).
The second is a dynamic link, it's a URL that another language(like ASP and PHP) interpret as something to do, like in those Google URLs, but i never used this site(foo.com), then i don't much things about this parameter.
Depending on how the site processes its URL, you may or may not need to include the ?... information.
This is passed to the website, and the server can process it just like form input. Some sites require this - and build their navigation off a single page, using nothing but the "extra" stuff passed afterwards. If you're generating a link to a site like that, it will be required.
In other cases, this is just used to pass extra, unrequired info (such as advertising, tracking info, etc)... In those cases, you can leave it off.
Unfortunately, there's no way to know without trying whether you can remove the "extra" bits from the URL.
After reading some of your comments - I'll also say:
There is nothing special about the "src" field in a query string. The server is free to use it any way it wishes. Unless you know specific info about the server, you cannot assume it can be left out.
The part after the ? is the query string. Different sites use it for different things, and it is usually used for passing information to the server side code for that URL, but can also be used in javascript.
For more info see Query String

Resources