Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 149055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:04:05+00:00 2026-05-11T09:04:05+00:00

I am currently using the meta http-equiv=’Refresh’ to automatic start PDF downloads. however this

  • 0

I am currently using the meta http-equiv=’Refresh’ to automatic start PDF downloads. however this has different effect on each of the browsers.

The main problem is with IE (6 & 7) once the user is redirected to the PDF if the user click the back button they are sent back to the page that initiated the download and then promptly redirect to the PDF again.

Firefox on windows has a better affect but still not perfect the user gets to the download page and is redirected to the PDF. However if they use the back button the completely miss the download page.

Currently Firefox on Linux has the exact effect i want. Being that the download page redirects you to the PDF and the back button from the PDF sends you back to the download page and there you stay.

I have tried using the javascript setTimeout() function to delay a pop-up of the PDF however the delay does not seem to work in any browser and the pop-up does not seem to work in IE7.

Has anyone implemented an elegant solution to the problem that i could use?

Thanks in advance for you help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:04:06+00:00Added an answer on May 11, 2026 at 9:04 am

    Referrer

    You could check the referrer:

    if (document.referrer != 'http://homepage.com/file.pdf') {     // go to the file } 

    It’s a little bit more complex because you have to compare to the absolute URL of the referrer, but this shouldn’t be a problem.

    Cookies

    You could set a cookie the first time you enter the download page. If the cookie is set (for every file another entry in the cookie) then you shouldn’t redirect.

    A disadvantage is that if someone reloads the page (because he wants to see the file a second time) he can’t access the file anymore. There are some possibilities around it:

    • Set a timestamp which expires in the cookie.
    • Add a link to the page which the user can click manually.

    Setting/Getting a cookie:

    if (document.cookie && document.cookie == 'I was here!') {     alert(document.cookie); } else { // set a cookie     document.cookie = 'I was here!'; } 

    Javascript can redirect like this:

    window.location.href = 'http://www.google.com'; 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Are you running on OS 3.0? I saw the same… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer It looks like you need to register Apache::Session::Memcached with Apache::Session::Wrapper,… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) -- Friday SELECT DATEPART(dw,GETDATE())… May 12, 2026 at 1:19 am

Related Questions

I am currently using the meta http-equiv='Refresh' to automatic start PDF downloads. however this
While I have been playing with Python for a few months now (just a
I am using Jörn Zaefferer's jquery autocomplete plugin, and I can't seem to figure
Using PHP, given a URL, how can I determine whether it is an image?
I am currently writing a system that stores meta data for around 140,000 ish

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.